From eb7a27f9f2d1fc0559f0e574b833eb8b11ba2cd1 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Tue, 21 Oct 2003 20:02:35 +0000 Subject: This commit was manufactured by cvs2svn to create branch 'release23-maint'. --- Doc/commontex/.cvsignore | 1 + Doc/lib/libplatform.tex | 221 ++++++++++++++++++++++++++++++ Doc/tools/getversioninfo | 72 ++++++++++ Doc/tut/glossary.tex | 311 +++++++++++++++++++++++++++++++++++++++++++ Modules/expat/macconfig.h | 104 +++++++++++++++ PC/.cvsignore | 2 + PC/make_versioninfo.c | 33 +++++ PCbuild/make_versioninfo.dsp | 108 +++++++++++++++ 8 files changed, 852 insertions(+) create mode 100644 Doc/commontex/.cvsignore create mode 100644 Doc/lib/libplatform.tex create mode 100755 Doc/tools/getversioninfo create mode 100644 Doc/tut/glossary.tex create mode 100644 Modules/expat/macconfig.h create mode 100644 PC/.cvsignore create mode 100644 PC/make_versioninfo.c create mode 100644 PCbuild/make_versioninfo.dsp diff --git a/Doc/commontex/.cvsignore b/Doc/commontex/.cvsignore new file mode 100644 index 0000000..fe65a25 --- /dev/null +++ b/Doc/commontex/.cvsignore @@ -0,0 +1 @@ +patchlevel.tex diff --git a/Doc/lib/libplatform.tex b/Doc/lib/libplatform.tex new file mode 100644 index 0000000..029c632 --- /dev/null +++ b/Doc/lib/libplatform.tex @@ -0,0 +1,221 @@ +\section{\module{platform} --- + Access to underlying platform's identifying data.} + +\declaremodule{standard}{platform} +\modulesynopsis{Retrieves as much platform identifying data as possible.} +\moduleauthor{Marc-Andre Lemburg}{mal@egenix.com} +\sectionauthor{Bjorn Pettersen}{bpettersen@corp.fairisaac.com} + +\versionadded{2.3} + +\begin{notice} + Specific platforms listed alphabetically, with Linux included in the + \UNIX{} section. +\end{notice} + +\subsection{Cross Platform} + +\begin{funcdesc}{architecture}{executable=sys.executable, bits='', linkage=''} + Queries the given executable (defaults to the Python interpreter + binary) for various architecture informations. + + Returns a tuple \code{(bits, linkage)} which contain information about + the bit architecture and the linkage format used for the + executable. Both values are returned as strings. + + Values that cannot be determined are returned as given by the + parameter presets. If bits is given as \code{''}, the + \cfunction{sizeof(pointer)} + (or \cfunction{sizeof(long)} on Python version < 1.5.2) is used as + indicator for the supported pointer size. + + The function relies on the system's \file{file} command to do the + actual work. This is available on most if not all \UNIX{} + platforms and some non-\UNIX{} platforms and then only if the + executable points to the Python interpreter. Reasonable defaults + are used when the above needs are not met. +\end{funcdesc} + +\begin{funcdesc}{machine}{} + Returns the machine type, e.g. \code{'i386'}. + An empty string is returned if the value cannot be determined. +\end{funcdesc} + +\begin{funcdesc}{node}{} + Returns the computer's network name (may not be fully qualified!). + An empty string is returned if the value cannot be determined. +\end{funcdesc} + +\begin{funcdesc}{platform}{aliased=0, terse=0} + Returns a single string identifying the underlying platform + with as much useful information as possible. + + The output is intended to be \emph{human readable} rather than + machine parseable. It may look different on different platforms and + this is intended. + + If \var{aliased} is true, the function will use aliases for various + platforms that report system names which differ from their common + names, for example SunOS will be reported as Solaris. The + \function{system_alias()} function is used to implement this. + + Setting \var{terse} to true causes the function to return only the + absolute minimum information needed to identify the platform. +\end{funcdesc} + +\begin{funcdesc}{processor}{} + Returns the (real) processor name, e.g. \code{'amdk6'}. + + An empty string is returned if the value cannot be determined. Note + that many platforms do not provide this information or simply return + the same value as for \function{machine()}. NetBSD does this. +\end{funcdesc} + +\begin{funcdesc}{python_build}{} + Returns a tuple \code{(\var{buildno}, \var{builddate})} stating the + Python build number and date as strings. +\end{funcdesc} + +\begin{funcdesc}{python_compiler}{} + Returns a string identifying the compiler used for compiling Python. +\end{funcdesc} + +\begin{funcdesc}{python_version}{} + Returns the Python version as string \code{'major.minor.patchlevel'} + + Note that unlike the Python \code{sys.version}, the returned value + will always include the patchlevel (it defaults to 0). +\end{funcdesc} + +\begin{funcdesc}{python_version_tuple}{} + Returns the Python version as tuple \code{(\var{major}, \var{minor}, + \var{patchlevel})} of strings. + + Note that unlike the Python \code{sys.version}, the returned value + will always include the patchlevel (it defaults to \code{'0'}). +\end{funcdesc} + +\begin{funcdesc}{release}{} + Returns the system's release, e.g. \code{'2.2.0'} or \code{'NT'} + An empty string is returned if the value cannot be determined. +\end{funcdesc} + +\begin{funcdesc}{system}{} + Returns the system/OS name, e.g. \code{'Linux'}, \code{'Windows'}, + or \code{'Java'}. + An empty string is returned if the value cannot be determined. +\end{funcdesc} + +\begin{funcdesc}{system_alias}{system, release, version} + Returns \code{(\var{system}, \var{release}, \var{version})} aliased + to common marketing names used for some systems. It also does some + reordering of the information in some cases where it would otherwise + cause confusion. +\end{funcdesc} + +\begin{funcdesc}{version}{} + Returns the system's release version, e.g. \code{'\#3 on degas'}. + An empty string is returned if the value cannot be determined. +\end{funcdesc} + +\begin{funcdesc}{uname}{} + Fairly portable uname interface. Returns a tuple of strings + \code{(\var{system}, \var{node}, \var{release}, \var{version}, + \var{machine}, \var{processor})} identifying the underlying + platform. + + Note that unlike the \function{os.uname()} function this also returns + possible processor information as additional tuple entry. + + Entries which cannot be determined are set to \code{''}. +\end{funcdesc} + + +\subsection{Java Platform} + +\begin{funcdesc}{java_ver}{release='', vendor='', vminfo=('','',''), + osinfo=('','','')} + Version interface for JPython. + + Returns a tuple \code{(\var{release}, \var{vendor}, \var{vminfo}, + \var{osinfo})} with \var{vminfo} being a tuple \code{(\var{vm_name}, + \var{vm_release}, \var{vm_vendor})} and \var{osinfo} being a tuple + \code{(\var{os_name}, \var{os_version}, \var{os_arch})}. + Values which cannot be determined are set to the defaults + given as parameters (which all default to \code{''}). +\end{funcdesc} + + +\subsection{Windows Platform} + +\begin{funcdesc}{win32_ver}{release='', version='', csd='', ptype=''} + Get additional version information from the Windows Registry + and return a tuple \code{(\var{version}, \var{csd}, \var{ptype})} + referring to version number, CSD level and OS type (multi/single + processor). + + As a hint: \var{ptype} is \code{'Uniprocessor Free'} on single + processor NT machines and \code{'Multiprocessor Free'} on multi + processor machines. The \emph{'Free'} refers to the OS version being + free of debugging code. It could also state \emph{'Checked'} which + means the OS version uses debugging code, i.e. code that + checks arguments, ranges, etc. + + \begin{notice}[note] + This function only works if Mark Hammond's \module{win32all} + package is installed and (obviously) only runs on Win32 + compatible platforms. + \end{notice} +\end{funcdesc} + +\subsubsection{Win95/98 specific} + +\begin{funcdesc}{popen}{cmd, mode='r', bufsize=None} + Portable \function{popen()} interface. Find a working popen + implementation preferring \function{win32pipe.popen()}. On Windows + NT, \function{win32pipe.popen()} should work; on Windows 9x it hangs + due to bugs in the MS C library. + % This KnowledgeBase article appears to be missing... + %See also \ulink{MS KnowledgeBase article Q150956}{}. +\end{funcdesc} + + +\subsection{Mac OS Platform} + +\begin{funcdesc}{mac_ver}{release='', versioninfo=('','',''), machine=''} + Get Mac OS version information and return it as tuple + \code{(\var{release}, \var{versioninfo}, \var{machine})} with + \var{versioninfo} being a tuple \code{(\var{version}, + \var{dev_stage}, \var{non_release_version})}. + + Entries which cannot be determined are set to \code{''}. All tuple + entries are strings. + + Documentation for the underlying \cfunction{gestalt()} API is + available online at \url{http://www.rgaros.nl/gestalt/}. +\end{funcdesc} + + +\subsection{\UNIX{} Platforms} + +\begin{funcdesc}{dist}{distname='', version='', id='', + supported_dists=('SuSE','debian','redhat','mandrake')} + Tries to determine the name of the OS distribution name + Returns a tuple \code{(\var{distname}, \var{version}, \var{id})} + which defaults to the args given as parameters. +\end{funcdesc} + + +\begin{funcdesc}{libc_ver}{executable=sys.executable, lib='', + version='', chunksize=2048} + Tries to determine the libc version against which the file + executable (defaults to the Python interpreter) is linked. Returns + a tuple of strings \code{(\var{lib}, \var{version})} which default + to the given parameters in case the lookup fails. + + Note that this function has intimate knowledge of how different + libc versions add symbols to the executable is probably only + useable for executables compiled using \program{gcc}. + + The file is read and scanned in chunks of \var{chunksize} bytes. +\end{funcdesc} diff --git a/Doc/tools/getversioninfo b/Doc/tools/getversioninfo new file mode 100755 index 0000000..9eb08d1 --- /dev/null +++ b/Doc/tools/getversioninfo @@ -0,0 +1,72 @@ +#! /usr/bin/env python + +import os +import re +import sys + +try: + __file__ +except NameError: + __file__ = sys.argv[0] + +tools = os.path.dirname(os.path.abspath(__file__)) +Doc = os.path.dirname(tools) +src = os.path.dirname(Doc) +patchlevel_h = os.path.join(src, "Include", "patchlevel.h") + +# This won't pick out all #defines, but it will pick up the ones we +# care about. +rx = re.compile(r"\s*#define\s+([a-zA-Z][a-zA-Z_0-9]*)\s+([a-zA-Z_0-9]+)") + +d = {} +f = open(patchlevel_h) +for line in f: + m = rx.match(line) + if m is not None: + name, value = m.group(1, 2) + d[name] = value +f.close() + +release = "%s.%s" % (d["PY_MAJOR_VERSION"], d["PY_MINOR_VERSION"]) +micro = int(d["PY_MICRO_VERSION"]) +shortversion = release +if micro != 0: + release += "." + str(micro) +level = d["PY_RELEASE_LEVEL"] + +suffixes = { + "PY_RELEASE_LEVEL_ALPHA": "a", + "PY_RELEASE_LEVEL_BETA": "b", + "PY_RELEASE_LEVEL_GAMMA": "c", + } + +releaseinfo = "" +if level != "PY_RELEASE_LEVEL_FINAL": + releaseinfo = suffixes[level] + str(int(d["PY_RELEASE_SERIAL"])) + +def write_file(name, text): + """Write text to a file if the file doesn't exist or if text + differs from any existing content.""" + if os.path.exists(name): + f = open(name, "r") + s = f.read() + f.close() + if s == text: + return + f = open(name, "w") + f.write(text) + f.close() + +patchlevel_tex = os.path.join(Doc, "commontex", "patchlevel.tex") +Makefile_version = os.path.join(Doc, "Makefile.version") + +write_file(patchlevel_tex, + "%% This file is generated by ../tools/getversioninfo;\n" + "%% do not edit manually.\n" + "\n" + "\\release{%s}\n" + "\\setreleaseinfo{%s}\n" + "\\setshortversion{%s}\n" + % (release, releaseinfo, shortversion)) + +print release + releaseinfo diff --git a/Doc/tut/glossary.tex b/Doc/tut/glossary.tex new file mode 100644 index 0000000..4702d67 --- /dev/null +++ b/Doc/tut/glossary.tex @@ -0,0 +1,311 @@ +\chapter{Glossary\label{glossary}} + +%%% keep the entries sorted and include at least one \index{} item for each +%%% cross-references are marked with \emph{entry} + +\begin{description} + + +\index{>>>} +\item[\code{>\code{>}>}] +The typical Python prompt of the interactive shell. Often seen for +code examples that can be tried right away in the interpreter. + +\index{...} +\item[\code{.\code{.}.}] +The typical Python prompt of the interactive shell when entering code +for an indented code block. + +\index{BDFL} +\item[BDFL] +Benevolent Dictator For Life, a.k.a. \ulink{Guido van +Rossum}{http://www.python.org/\textasciitilde{}guido/}, Python's creator. + +\index{byte code} +\item[byte code] +The internal representation of a Python program in the interpreter. +The byte code is also cached in the \code{.pyc} and \code{.pyo} +files so that executing the same file is faster the second time +(compilation from source to byte code can be saved). This +``intermediate language'' is said to run on a ``virtual +machine'' that calls the subroutines corresponding to each bytecode. + +\index{classic class} +\item[classic class] +Any class which does not inherit from \class{object}. See +\emph{new-style class}. + +\index{coercion} +\item[coercion] +Converting data from one type to another. For example, +{}\code{int(3.15)} coerces the floating point number to the integer, +{}\code{3}. Most mathematical operations have rules for coercing +their arguments to a common type. For instance, adding \code{3+4.5}, +causes the integer \code{3} to be coerced to be a float +{}\code{3.0} before adding to \code{4.5} resulting in the float +{}\code{7.5}. + +\index{descriptor} +\item[descriptor] +Any \emph{new-style} object that defines the methods +{}\method{__get__()}, \method{__set__()}, or \method{__delete__()}. +When a class attribute is a descriptor, its special binding behavior +is triggered upon attribute lookup. Normally, writing \var{a.b} looks +up the object \var{b} in the class dictionary for \var{a}, but if +{}\var{b} is a descriptor, the defined method gets called. +Understanding descriptors is a key to a deep understanding of Python +because they are the basis for many features including functions, +methods, properties, class methods, static methods, and reference to +super classes. + +\index{dictionary} +\item[dictionary] +An associative array, where arbitrary keys are mapped to values. The +use of \class{dict} much resembles that for \class{list}, but the keys +can be any object with a \method{__hash__()} function, not just +integers starting from zero. Called a hash in Perl. + +\index{EAFP} +\item[EAFP] +Easier to ask for forgiveness than permission. This common Python +coding style assumes the existence of valid keys or attributes and +catches exceptions if the assumption proves false. This clean and +fast style is characterized by the presence of many \keyword{try} and +{}\keyword{except} statements. The technique contrasts with the +{}\emph{LBYL} style that is common in many other languages such as C. + +\index{__future__} +\item[__future__] +A pseudo module which programmers can use to enable new language +features which are not compatible with the current interpreter. For +example, the expression \code{11/4} currently evaluates to \code{2}. +If the module in which it is executed had enabled \emph{true division} +by executing: + +\begin{verbatim} +from __future__ import division +\end{verbatim} + +the expression \code{11/4} would evaluate to \code{2.75}. By actually +importing the \ulink{\module{__future__}}{../lib/module-future.html} +module and evaluating its variables, you can see when a new feature +was first added to the language and when it will become the default: + +\begin{verbatim} +>>> import __future__ +>>> __future__.division +_Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192) +\end{verbatim} + +\index{generator} +\item[generator] +A function that returns an iterator. It looks like a normal function +except that the \keyword{yield} keyword is used instead of +{}\keyword{return}. Generator functions often contain one or more +{}\keyword{for} or \keyword{while} loops that \keyword{yield} elements +back to the caller. The function execution is stopped at the +{}\keyword{yield} keyword (returning the result) and is resumed there +when the next element is requested by calling the \method{next()} +method of the returned iterator. + +\index{GIL} +\item[GIL] +See \emph{global interpreter lock}. + +\index{global interpreter lock} +\item[global interpreter lock] +The lock used by Python threads to assure that only one thread can be +run at a time. This simplifies Python by assuring that no two +processes can access the same memory at the same time. Locking the +entire interpreter makes it easier for the interpreter to be +multi-threaded, at the expense of some parallelism on multi-processor +machines. Efforts have been made in the past to create a +``free-threaded'' interpreter (one which locks shared data at a much +finer granularity), but performance suffered in the common +single-processor case. + +\index{IDLE} +\item[IDLE] +An Integrated Development Environment for Python. IDLE is a +basic editor and interpreter environment that ships with the standard +distribution of Python. Good for beginners, it also serves as clear +example code for those wanting to implement a moderately +sophisticated, multi-platform GUI application. + +\index{immutable} +\item[immutable] +A object with fixed value. Immutable objects are numbers, strings or +tuples (and more). Such an object cannot be altered. A new object +has to be created if a different value has to be stored. They play an +important role in places where a constant hash value is needed. For +example as a key in a dictionary. + +\index{integer division} +\item[integer division] +Mathematical division discarding any remainder. For example, the +expression \code{11/4} currently evaluates to \code{2} in contrast +to the \code{2.75} returned by float division. Also called +{}\emph{floor division}. When dividing two integers the outcome will +always be another integer (having the floor function applied to it). +However, if one of the operands is another numeric type (such as a +{}\class{float}), the result will be coerced (see \emph{coercion}) to +a common type. For example, a integer divided by a float will result +in a float value, possibly with a decimal fraction. Integer division +can be forced by using the \code{//} operator instead of the \code{/} +operator. See also \emph{__future__}. + +\index{interactive} +\item[interactive] +Python has an interactive interpreter which means that you can try out +things and directly see its result. Just launch \code{python} with no +arguments (possibly by selecting it from your computer's main menu). +It is a very powerful way to test out new ideas or inspect modules and +packages (remember \code{help(x)}). + +\index{interpreted} +\item[interpreted] +Python is an interpreted language, opposed to a compiled one. This +means that the source files can be run right away without first making +an executable which is then run. Interpreted languages typically have +a shorter development/debug cycle than compiled ones. See also +{}\emph{interactive}. + +\index{iterable} +\item[iterable] +A container object capable of returning its members one at a time. +Examples of iterables include all sequence types (such as \class{list}, +{}\class{str}, and \class{tuple}) and some non-sequence types like +{}\class{dict} and \class{file} and objects of any classes you define +with an \method{__iter__()} or \method{__getitem__()} method. Iterables +can be used in a \keyword{for} loop and in many other places where a +sequence is needed (\function{zip()}, \function{map()}, ...). When an +iterable object is passed as an argument to the builtin function +{}\function{iter()}, it returns an iterator for the object. This +iterator is good for one pass over the set of values. When using +iterables, it is usually not necessary to call \function{iter()} or +deal with iterator objects yourself. The \code{for} statement does +that automatically for you, creating a temporary unnamed variable to +hold the iterator for the duration of the loop. See also +{}\emph{iterator}, \emph{sequence}, and \emph{generator}. + +\index{iterator} +\item[iterator] +An object representing a stream of data. Repeated calls to the +iterator's \method{next()} method return successive items in the +stream. When no more data is available a \exception{StopIteration} +exception is raised instead. At this point, the iterator object is +exhausted and any further calls to its \method{next()} method just +raise \exception{StopIteration} again. Iterators are required to have +an \method{__iter__()} method that returns the iterator object +itself so every iterator is also iterable and may be used in most +places where other iterables are accepted. One notable exception is +code that attempts multiple iteration passes. A container object +(such as a \class{list}) produces a fresh new iterator each time you +pass it to the \function{iter()} function or use it in a +{}\keyword{for} loop. Attempting this with an iterator will just +return the same exhausted iterator object from the second iteration +pass, making it appear like an empty container. + +\index{list comprehension} +\item[list comprehension] +A compact way to process all or a subset of elements in a sequence and +return a list with the results. \code{result = ["0x\%02x" +\% x for x in range(256) if x \% 2 == 0]} generates a list of strings +containing hex numbers (0x..) that are even and in the range from 0 to 255. +The \keyword{if} clause is optional. If omitted, all elements in +{}\code{range(256)} are processed in that case. + +\index{mapping} +\item[mapping] +A container object (such as \class{dict}) that supports arbitrary key +lookups using the special method \method{__getitem__()}. + +\index{metaclass} +\item[metaclass] +The class of a class. Class definitions create a class name, a class +dictionary, and a list of base classes. The metaclass is responsible +for taking those three arguments and creating the class. Most object +oriented programming languages provide a default implementation. What +makes Python special is that it is possible to create custom +metaclasses. Most users never need this tool, but when the need +arises, metaclasses can provide powerful, elegant solutions. They +have been used for logging attribute access, adding thread-safety, +tracking object creation, implementing singletons, and many other +tasks. + +\index{LBYL} +\item[LBYL] +Look before you leap. This coding style explicitly tests for +pre-conditions before making calls or lookups. This style contrasts +with the \emph{EAFP} approach and is characterized the presence of +many \keyword{if} statements. + +\index{mutable} +\item[mutable] +Mutable objects can change their value but keep their \function{id()}. +See also \emph{immutable}. + +\index{namespace} +\item[namespace] +The place where a variable is stored. Namespaces are implemented as +dictionary. There is the local, global and builtins namespace and the +nested namespaces in objects (in methods). Namespaces support +modularity by preventing naming conflicts. For instance, the +functions \function{__builtin__.open()} and \function{os.open()} are +distinguished by their namespaces. Namespaces also aid readability +and maintainability by making it clear which modules implement a +function. For instance, writing \function{random.seed()} or +{}\function{itertools.izip()} makes it clear that those functions are +implemented by the \ulink{\module{random}}{../lib/module-random.html} +and \ulink{\module{itertools}}{../lib/module-itertools.html} modules +respectively. + +\index{nested scope} +\item[nested scope] +The ability to refer to a variable in an enclosing definition. For +instance, a function defined inside another function can refer to +variables in the outer function. Note that nested scopes work only +for reference and not for assignment which will always write to the +innermost scope. In contrast, local variables both read and write in +the innermost scope. Likewise, global variables read and write to the +global namespace. + +\index{new-style class} +\item[new-style class] +Any class that inherits from \class{object}. This includes all +built-in types like \class{list} and \class{dict}. Only new-style +classes can use Python's newer, versatile features like +{}\method{__slots__}, descriptors, properties, +\method{__getattribute__()}, class methods, and static methods. + +\index{Python3000} +\item[Python3000] +A mythical python release, allowed not to be backward compatible, with +telepathic interface. + +\index{__slots__} +\item[__slots__] +A declaration inside a \emph{new-style class} that saves memory by +pre-declaring space for instance attributes and eliminating instance +dictionaries. Though popular, the technique is somewhat tricky to get +right and is best reserved for rare cases where there are large +numbers of instances in a memory critical application. + +\index{sequence} +\item[sequence] +An \emph{iterable} which supports efficient element access using +integer indices via the \method{__getitem__()} and +{}\method{__len__()} special methods. Some built-in sequence types +are \class{list}, \class{str}, \class{tuple}, and \class{unicode}. +Note that \class{dict} also supports \method{__getitem__()} and +{}\method{__len__()}, but is considered a mapping rather than a +sequence because the lookups use arbitrary \emph{immutable} keys +rather than integers. + +\index{Zen of Python} +\item[Zen of Python] +Listing of Python design principles and philosophies that are helpful +in understanding and using the language. The listing can be found by +typing ``\code{import this}'' at the interactive prompt. + +\end{description} diff --git a/Modules/expat/macconfig.h b/Modules/expat/macconfig.h new file mode 100644 index 0000000..3c5eb54 --- /dev/null +++ b/Modules/expat/macconfig.h @@ -0,0 +1,104 @@ +/*================================================================ +** Copyright 2000, Clark Cooper +** All rights reserved. +** +** This is free software. You are permitted to copy, distribute, or modify +** it under the terms of the MIT/X license (contained in the COPYING file +** with this distribution.) +** +*/ + +#ifndef MACCONFIG_H +#define MACCONFIG_H + + +/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ +#define BYTEORDER 4321 + +/* Define to 1 if you have the `bcopy' function. */ +#undef HAVE_BCOPY + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS + +/* whether byteorder is bigendian */ +#define WORDS_BIGENDIAN + +/* Define to specify how much context to retain around the current parse + point. */ +#undef XML_CONTEXT_BYTES + +/* Define to make parameter entity parsing functionality available. */ +#define XML_DTD + +/* Define to make XML Namespaces functionality available. */ +#define XML_NS + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `long' if does not define. */ +#define off_t long + +/* Define to `unsigned' if does not define. */ +#undef size_t + + +#endif /* ifndef MACCONFIG_H */ diff --git a/PC/.cvsignore b/PC/.cvsignore new file mode 100644 index 0000000..df8a29e --- /dev/null +++ b/PC/.cvsignore @@ -0,0 +1,2 @@ +pythonnt_rc.h +pythonnt_rc_d.h diff --git a/PC/make_versioninfo.c b/PC/make_versioninfo.c new file mode 100644 index 0000000..41c026f --- /dev/null +++ b/PC/make_versioninfo.c @@ -0,0 +1,33 @@ +#include +#include "patchlevel.h" +/* + * This program prints out an include file containing fields required to build + * the version info resource of pythonxx.dll because the resource compiler + * cannot do the arithmetic. + */ +/* + * FIELD3 is the third field of the version number. + * This is what we'd like FIELD3 to be: + * + * #define FIELD3 (PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL) + * + * but that neither gives an error nor comes anywhere close to working. + * + * For 2.4a0, + * PY_MICRO_VERSION = 0 + * PY_RELEASE_LEVEL = 'alpha' = 0xa + * PY_RELEASE_SERIAL = 0 + * + * gives FIELD3 = 0*1000 + 10*10 + 0 = 100 + */ +int main(int argc, char **argv) +{ + printf("/* This file created by make_versioninfo.exe */\n"); + printf("#define FIELD3 %d\n", + PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL); + printf("#define MS_DLL_ID \"%d.%d\"\n", + PY_MAJOR_VERSION, PY_MINOR_VERSION); + printf("#define PYTHON_DLL_NAME \"python%d%d.dll\"\n", + PY_MAJOR_VERSION, PY_MINOR_VERSION); + return 0; +} diff --git a/PCbuild/make_versioninfo.dsp b/PCbuild/make_versioninfo.dsp new file mode 100644 index 0000000..7b3e2d2 --- /dev/null +++ b/PCbuild/make_versioninfo.dsp @@ -0,0 +1,108 @@ +# Microsoft Developer Studio Project File - Name="make_versioninfo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=make_versioninfo - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "make_versioninfo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "make_versioninfo.mak" CFG="make_versioninfo - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "make_versioninfo - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "make_versioninfo - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "make_versioninfo" +# PROP Scc_LocalPath ".." +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "make_versioninfo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "." +# PROP Intermediate_Dir "x86-temp-release\make_versioninfo" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\Include" /I "..\PC" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1d000000" /subsystem:console /debug /machine:I386 +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build +InputPath=.\make_versioninfo.exe +SOURCE="$(InputPath)" + +"..\PC\pythonnt_rc.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + .\make_versioninfo.exe >..\PC\pythonnt_rc.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "make_versioninfo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "." +# PROP Intermediate_Dir "x86-temp-debug\make_versioninfo" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\Include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1d000000" /subsystem:console /debug /machine:I386 /out:"./make_versioninfo_d.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build +InputPath=.\make_versioninfo_d.exe +SOURCE="$(InputPath)" + +"..\PC\pythonnt_rc_d.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + .\make_versioninfo_d.exe >..\PC\pythonnt_rc_d.h + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "make_versioninfo - Win32 Release" +# Name "make_versioninfo - Win32 Debug" +# Begin Source File + +SOURCE=..\PC\make_versioninfo.c +# End Source File +# End Target +# End Project -- cgit v0.12