Commit 2d4aed33 authored by Martin v. Löwis's avatar Martin v. Löwis

Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774.

parent 9a4a0d2f
......@@ -2380,10 +2380,10 @@ Windows.
Grab the binary installer from \url{http://www.python.org/} and
install Python. The binary installer has all of the required header
files except for \file{config.h}.
files except for \file{pyconfig.h}.
Get the source distribution and extract it into a convenient location.
Copy the \file{config.h} from the \file{PC/} directory into the
Copy the \file{pyconfig.h} from the \file{PC/} directory into the
\file{include/} directory created by the installer.
Create a \file{Setup} file for your extension module, as described in
......
......@@ -140,7 +140,7 @@ Raised when an \keyword{assert} statement fails.
always defined, but can only be raised when Python is configured
with the \longprogramopt{with-fpectl} option, or the
\constant{WANT_SIGFPE_HANDLER} symbol is defined in the
\file{config.h} file.
\file{pyconfig.h} file.
\end{excdesc}
\begin{excdesc}{IOError}
......
......@@ -129,7 +129,7 @@ It is always available.
also \code{'/usr/local'}. This can be set at build time with the
\longprogramopt{exec-prefix} argument to the \program{configure}
script. Specifically, all configuration files (e.g. the
\file{config.h} header file) are installed in the directory
\file{pyconfig.h} header file) are installed in the directory
\code{exec_prefix + '/lib/python\var{version}/config'}, and shared
library modules are installed in \code{exec_prefix +
'/lib/python\var{version}/lib-dynload'}, where \var{version} is
......@@ -298,7 +298,7 @@ else:
the \longprogramopt{prefix} argument to the \program{configure}
script. The main collection of Python library modules is installed
in the directory \code{prefix + '/lib/python\var{version}'} while
the platform independent header files (all except \file{config.h})
the platform independent header files (all except \file{pyconfig.h})
are stored in \code{prefix + '/include/python\var{version}'}, where
\var{version} is equal to \code{version[:3]}.
\end{datadesc}
......
......@@ -21,7 +21,7 @@
/* Include nearly all Python header files */
#include "patchlevel.h"
#include "config.h"
#include "pyconfig.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
......
......@@ -7,7 +7,7 @@ extern "C" {
/* Include files and extern declarations used by most of the parser. */
#include "config.h"
#include "pyconfig.h"
/* config.h may or may not define DL_IMPORT */
#ifndef DL_IMPORT /* declarations for DLL import/export */
......
#ifndef Py_PYPORT_H
#define Py_PYPORT_H
#include "config.h" /* include for defines */
#include "pyconfig.h" /* include for defines */
/**************************************************************************
Symbols and macros to supply platform-independent interfaces to basic
......
......@@ -125,7 +125,7 @@ class build_ext (Command):
self.extensions = self.distribution.ext_modules
# Make sure Python's include directories (for Python.h, config.h,
# Make sure Python's include directories (for Python.h, pyconfig.h,
# etc.) are in the include search path.
py_include = sysconfig.get_python_inc()
plat_py_include = sysconfig.get_python_inc(plat_specific=1)
......@@ -592,7 +592,7 @@ class build_ext (Command):
"""
# The python library is always needed on Windows. For MSVC, this
# is redundant, since the library is mentioned in a pragma in
# config.h that MSVC groks. The other Windows compilers all seem
# pyconfig.h that MSVC groks. The other Windows compilers all seem
# to need it mentioned explicitly, though, so that's what we do.
# Append '_d' to the python import library on debug builds.
from distutils.msvccompiler import MSVCCompiler
......
......@@ -73,7 +73,7 @@ class CygwinCCompiler (UnixCCompiler):
(status, details))
if status is not CONFIG_H_OK:
self.warn(
"Python's config.h doesn't seem to support your compiler. " +
"Python's pyconfig.h doesn't seem to support your compiler. " +
("Reason: %s." % details) +
"Compiling may fail because of undefined preprocessor macros.")
......@@ -335,7 +335,7 @@ class Mingw32CCompiler (CygwinCCompiler):
# class Mingw32CCompiler
# Because these compilers aren't configured in Python's config.h file by
# Because these compilers aren't configured in Python's pyconfig.h file by
# default, we should at least warn the user if he is using a unmodified
# version.
......@@ -345,7 +345,7 @@ CONFIG_H_UNCERTAIN = "uncertain"
def check_config_h():
"""Check if the current Python installation (specifically, config.h)
"""Check if the current Python installation (specifically, pyconfig.h)
appears amenable to building extensions with GCC. Returns a tuple
(status, details), where 'status' is one of the following constants:
CONFIG_H_OK
......@@ -353,21 +353,21 @@ def check_config_h():
CONFIG_H_NOTOK
doesn't look good
CONFIG_H_UNCERTAIN
not sure -- unable to read config.h
not sure -- unable to read pyconfig.h
'details' is a human-readable string explaining the situation.
Note there are two ways to conclude "OK": either 'sys.version' contains
the string "GCC" (implying that this Python was built with GCC), or the
installed "config.h" contains the string "__GNUC__".
installed "pyconfig.h" contains the string "__GNUC__".
"""
# XXX since this function also checks sys.version, it's not strictly a
# "config.h" check -- should probably be renamed...
# "pyconfig.h" check -- should probably be renamed...
from distutils import sysconfig
import string
# if sys.version contains GCC then python was compiled with
# GCC, and the config.h file should be OK
# GCC, and the pyconfig.h file should be OK
if string.find(sys.version,"GCC") >= 0:
return (CONFIG_H_OK, "sys.version mentions 'GCC'")
......@@ -386,7 +386,7 @@ def check_config_h():
"couldn't read '%s': %s" % (fn, exc.strerror))
else:
# "config.h" contains an "#ifdef __GNUC__" or something similar
# "pyconfig.h" contains an "#ifdef __GNUC__" or something similar
if string.find(s,"__GNUC__") >= 0:
return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn)
else:
......
......@@ -43,7 +43,7 @@ def get_python_inc(plat_specific=0, prefix=None):
If 'plat_specific' is false (the default), this is the path to the
non-platform-specific header files, i.e. Python.h and so on;
otherwise, this is the path to platform-specific header files
(namely config.h).
(namely pyconfig.h).
If 'prefix' is supplied, use it instead of sys.prefix or
sys.exec_prefix -- i.e., ignore 'plat_specific'.
......@@ -137,10 +137,10 @@ def customize_compiler(compiler):
def get_config_h_filename():
"""Return full pathname of installed config.h file."""
"""Return full pathname of installed pyconfig.h file."""
if python_build: inc_dir = '.'
else: inc_dir = get_python_inc(plat_specific=1)
return os.path.join(inc_dir, "config.h")
return os.path.join(inc_dir, "pyconfig.h")
def get_makefile_filename():
......
......@@ -118,7 +118,7 @@ SRCDIRS= @SRCDIRS@
SUBDIRSTOO= Include Lib Misc Demo
# Files and directories to be distributed
CONFIGFILES= configure configure.in acconfig.h config.h.in Makefile.pre.in
CONFIGFILES= configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in
DISTFILES= README ChangeLog $(CONFIGFILES)
DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
DIST= $(DISTFILES) $(DISTDIRS)
......@@ -417,7 +417,7 @@ Mac/Python/macglue.o: $(srcdir)/Mac/Python/macglue.c
PYTHON_HEADERS= \
Include/Python.h \
config.h \
pyconfig.h \
Include/patchlevel.h \
Include/pyport.h \
Include/pymem.h \
......@@ -650,7 +650,7 @@ inclinstall:
echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
$(INSTALL_DATA) $$i $(INCLUDEPY); \
done
$(INSTALL_DATA) config.h $(CONFINCLUDEPY)/config.h
$(INSTALL_DATA) pyconfig.h $(CONFINCLUDEPY)/pyconfig.h
# Install the library and miscellaneous stuff needed for extending/embedding
# This goes into $(exec_prefix)
......@@ -732,7 +732,7 @@ recheck:
$(SHELL) config.status --recheck
$(SHELL) config.status
# Rebuild the configure script from configure.in; also rebuild config.h.in
# Rebuild the configure script from configure.in; also rebuild pyconfig.h.in
autoconf:
(cd $(srcdir); autoconf)
(cd $(srcdir); autoheader)
......@@ -762,7 +762,7 @@ clean:
clobber: clean
-rm -f $(PYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
tags TAGS \
config.cache config.log config.h Modules/config.c
config.cache config.log pyconfig.h Modules/config.c
-rm -rf build platform
# Make things extra clean, before making a distribution:
......
......@@ -19,8 +19,8 @@ for Python. Not all source files are relevant -- some are platform
specific, others are only used in emergencies (e.g. getopt.c). The
Makefiles tell the story.
You'll also need a config.h file tailored for your platform. You can
start with config.h.in, read the comments and turn on definitions that
You'll also need a pyconfig.h file tailored for your platform. You can
start with pyconfig.h.in, read the comments and turn on definitions that
apply to your platform.
And you'll need a config.c file, which lists the built-in modules you
......
......@@ -25,7 +25,7 @@ raiseTestError(const char* test_name, const char* msg)
return NULL;
}
/* Test #defines from config.h (particularly the SIZEOF_* defines).
/* Test #defines from pyconfig.h (particularly the SIZEOF_* defines).
The ones derived from autoconf on the UNIX-like OSes can be relied
upon (in the absence of sloppy cross-compiling), but the Windows
......
#include "config.h"
#include "pyconfig.h"
#ifdef macintosh
#include "macbuildno.h"
......
......@@ -46,7 +46,7 @@ corresponding Unix manual entries for more information on calls.";
#endif /* HAVE_UNISTD_H */
/* Various compilers have only certain posix functions */
/* XXX Gosh I wish these were all moved into config.h */
/* XXX Gosh I wish these were all moved into pyconfig.h */
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
#include <process.h>
#else
......
......@@ -10,7 +10,7 @@ forgotten) from the programmer.
#include "windows.h"
/* NT and Python share these */
#include "config.h"
#include "pyconfig.h"
#include "Python.h"
char dllVersionBuffer[16] = ""; // a private buffer
......
This diff is collapsed.
This diff is collapsed.
......@@ -926,9 +926,9 @@ item: Install File
Flags=0000000000000010
end
item: Install File
Source=%_SRC_%\PC\config.h
Destination=%MAINDIR%\include\config.h
Description=Header files (config.h)
Source=%_SRC_%\PC\pyconfig.h
Destination=%MAINDIR%\include\pyconfig.h
Description=Header files (pyconfig.h)
Flags=0000000000000010
end
item: Install File
......
......@@ -4,7 +4,7 @@
and is slow and inaccurate.
But it's good enough for the occasional string literal... */
#include "config.h"
#include "pyconfig.h"
#include <ctype.h>
......
/* Portable fmod(x, y) implementation for systems that don't have it */
#include "config.h"
#include "pyconfig.h"
#include "pyport.h"
#include <errno.h>
......
......@@ -4,7 +4,7 @@
/* (A separate file because this may be OS dependent) */
#include "Python.h"
#include "config.h"
#include "pyconfig.h"
time_t
PyOS_GetLastModificationTime(char *path, FILE *fp)
......
/* hypot() replacement */
#include "config.h"
#include "pyconfig.h"
#include "pyport.h"
double hypot(double x, double y)
......
#include "config.h"
#include "pyconfig.h"
#include "pyfpe.h"
/*
* The signal handler for SIGFPE is actually declared in an external
......
#include "config.h"
#include "pyconfig.h"
/* comp.sources.misc strtod(), as posted in comp.lang.tcl,
with bugfix for "123000.0" and acceptance of space after 'e' sign nuked.
......
......@@ -5,7 +5,7 @@
which is included by this file dependent on config settings.
Stuff shared by all thread_*.h files is collected here. */
#include "config.h"
#include "pyconfig.h"
/* config.h may or may not define DL_IMPORT */
#ifndef DL_IMPORT /* declarations for DLL import/export */
......
#! /bin/sh
# From configure.in Revision: 1.234
# From configure.in Revision: 1.235
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
......@@ -7107,7 +7107,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "Makefile.pre Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
trap 'rm -fr `echo "Makefile.pre Modules/Setup.config pyconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
......@@ -7305,7 +7305,7 @@ ac_eD='%g'
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_HEADERS="config.h"
CONFIG_HEADERS="pyconfig.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
......
......@@ -2,7 +2,7 @@ dnl Process this file with autoconf 2.0 or later to make a configure script.
AC_REVISION($Revision$)
AC_PREREQ(2.0)
AC_INIT(Include/object.h)
AC_CONFIG_HEADER(config.h)
AC_CONFIG_HEADER(pyconfig.h)
# Set VERSION so we only need to edit in one place (i.e., here)
AC_SUBST(VERSION)
......
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* pyconfig.h.in. Generated automatically from configure.in by autoheader. */
/* Define if on AIX 3.
System headers sometimes define this.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment