knows about plat-mac subdirectories, and configure adds a variable
EXTRAPLATDIR. These together take care of copying Lib/plat-mac to
the destination on darwin.
Adding plat-mac is still done with a .pth file which is only created when
you do a framework build. I'm not 100% happy with this, but fixing it
really needs a functional pythonw in non-framework builds, and I don't
think I can do that before 2.3a1 (but I'll try:-).
Check for readline 2.2 features. This should make it possible to
compile readline.c again with GNU readline versions 2.0 or 2.1; this
ability was removed in readline.c rev. 2.49. Apparently the older
versions are still in widespread deployment on older Solaris
installations. With an older readline, completion behavior is subtly
different (a space is always added).
us to completely decouple the framework from the executable, so we
can use a two-level namespace.
- Do framework builds with a twolevel namespace.
- Reorganized the code that creates the minimal framework in the build
directory, to make it more robust against incomplete frameworks (from
earlier aborted builds, or builds of previous Python versions).
for the time module, because somehow configure won't define the
symbols HAVE_STRUCT_TM_TM_ZONE, HAVE_TM_ZONE, and HAVE_TZNAME in this
case.
I've got no time to research this further, so I leave it in Jeremy and
Martin's capable hands to find a different solution for True64 (or to
devise a way to get the time tests to succeed while defining
_XOPEN_SOURCE).
This gets compilation of posixmodule.c to succeed on Tru64 and does no
harm on Linux. We may need to undefine it on some platforms, but
let's wait and see.
Martin says:
> I think it is generally the right thing to define _XOPEN_SOURCE on
> Unix, providing a negative list of systems that cannot support this
> setting (or preferably solving whatever problems remain).
>
> I'd put an (unconditional) AC_DEFINE into configure.in early on; it
> *should* go into confdefs.h as configure proceeds, and thus be active
> when other tests are performed.
The staticforward define was needed to support certain broken C
compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
static keyword when it was used with a forward declaration of a static
initialized structure. Standard C allows the forward declaration with
static, and we've decided to stop catering to broken C compilers. (In
fact, we expect that the compilers are all fixed eight years later.)
I'm leaving staticforward and statichere defined in object.h as
static. This is only for backwards compatibility with C extensions
that might still use it.
XXX I haven't updated the documentation.
OSX framework build process. Things fixed/modified:
- the filesystem case-sensitivity test now works for builds outside
the source directory
- various other fixes for building outside the source directory
- python.app now has a target in the main Makefile
- WASTE and AquaTk are found more automatically
library. Since multiple versions can be installed simultaneously, it's
crucial that you only select libraries and header files which are compatible
with each other. Version checking is done from highest version to lowest.
Building using version 1 of Berkeley DB is disabled by default because of
the hash file bugs people keep rediscovering. It can be enabled by
uncommenting a few lines in setup.py. Closes patch 553108.
This patch complies with the following request found
near the top of configure.in:
# This is for stuff that absolutely must end up in pyconfig.h.
# Please use pyport.h instead, if possible.
I tested this patch under Cygwin, Win32, and Red
Hat Linux. Python built and ran successfully on
each of these platforms.
[ 559250 ] more POSIX signal stuff
Adds support (and docs and tests and autoconfery) for posix signal
mask handling -- sigpending, sigprocmask and sigsuspend.
This patch complies with the following request found
near the top of configure.in:
# This is for stuff that absolutely must end up in pyconfig.h.
# Please use pyport.h instead, if possible.
I tested this patch under Cygwin, Win32, and Red
Hat Linux. Python built and ran successfully on
each of these platforms.
Highlights: import and friends will understand any of \r, \n and \r\n
as end of line. Python file input will do the same if you use mode 'U'.
Everything can be disabled by configuring with --without-universal-newlines.
See PEP278 for details.
or libraries also look for thread_detach. SGI has thread_create in libc
but complete pthread support only in -lpthread. Fixes#522393.
2.2.1 candidate.Killed by signal 2.
[ #417634 ] configuring without C++ compiler name
by checking that we're not about to try to compile C++ files with "yes".
Now we wait for the system where the C++ compiler *is* called yes...
used the default Darwin/* for the old code. Reversed those tests so
that compatibility code is in a switch leg with a specific version and
newer systems take the default leg.
This should allow Python to build on OSX 10.1.1 (which jumps from Darwin/1.4
to Darwin/5.1 due to a new numbering scheme).
routines. As of 10.1 using Carbon will crash Python if no window server is
available (ssh connection, console mode, MacOSX Server). This fixes bug
#466907.
A result of this mod is that the default 8bit encoding on OSX is now ASCII,
for the time being. Also, the extension modules that need the Carbon
framework now explicitly include it in setup.py.
STRICT_SYSV_CURSES when compiling curses module on HP/UX. Generalize
access to _flags on systems where WINDOW is opaque. Fixes bugs
#432497, #422265, and the curses parts of #467145 and #473150.
1. configure doesn't handle HP-UX release numbers
(e.g., B.11.00), resulting in MACHDEP = "hpuxB".
2. After checking for wchar.h, configure doesn't
include it when checking the size of wchar_t.
(Python 2.2b1 on HP-UX 11.00)
This adds unsetenv to posix, and uses it in the __delitem__ method of
os.environ.
(XXX Should we change the preferred name for putenv to setenv, for
consistency?)
This is a big one, touching lots of files. Some of the platforms
aren't tested yet. Briefly, this changes the return value of the
os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the
time functions localtime(), gmtime(), and strptime() from tuples into
pseudo-sequences. When accessed as a sequence, they behave exactly as
before. But they also have attributes like st_mtime or tm_year. The
stat return value, moreover, has a few platform-specific attributes
that are not available through the sequence interface (because
everybody expects the sequence to have a fixed length, these couldn't
be added there). If your platform's struct stat doesn't define
st_blksize, st_blocks or st_rdev, they won't be accessible from Python
either.
(Still missing is a documentation update.)
supplied values are the most "normal" or "common" values found for
recent 32 bit machines. This now seems to work to build Python 2.2
for the ARM processor used on the iPAQ.
by bbrox@bbrox.org / lionel.ulmer@free.fr.
This adds a configure check and if all goes well turns on the
PTHREAD_SCOPE_SYSTEM thread attribute for new threads.
This should remove the need to add tiny sleeps at the start of threads
to allow other threads to be scheduled.
support on Linux (and Solaris, I expect) for real.
The necessary symbols are defined once and for all,
under the assumption that they won't harm elsewhere.
out of the box on OSX 10.1. Untested by me (except for not having adverse
effects on 10.0.4) but it looks good, for now. Eventually we should not
trigger on the darwin version but test for something, but until I have
the time to install 10.1 myself I have no clue what to test on.
It would be nice if this got in to the 2.2a3 distribution.
I don't know what difference it makes, but '/' indeed makes less sense
as an include dir than '.', so I'm changing the default. Just so I
can close the bug. ;-)
I believe this works on Linux (tested both on a system with large file
support and one without it), and it may work on Solaris 2.7.
The changes are twofold:
(1) The configure script now boldly tries to set the two symbols that
are recommended (for Solaris and Linux), and then tries a test
script that does some simple seeking without writing.
(2) The _portable_{fseek,ftell} functions are a little more systematic
in how they try the different large file support options: first
try fseeko/ftello, but only if off_t is large; then try
fseek64/ftell64; then try hacking with fgetpos/fsetpos.
I'm keeping my fingers crossed. The meaning of the
HAVE_LARGEFILE_SUPPORT macro is not at all clear.
I'll see if I can get it to work on Windows as well.
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
- Made framework builds work for MacOSX. The configure arg is now
"--enable-framework".
- Added an install target frameworkinstall which installs the framework.
- Ripped out Next/OpenStep support, which was broken anyway.
- Made the MacOSX toolbox glue dependant on a --enable-toolbox-glue
configure arg. This should make naked darwin build work again (untested).
A few targets have been added to Makefile.pre.in, and on inspection they
look harmless to non-MacOSX machines, but it is worth checking.
Closes bug #420601 and patch #450350.
- Give a warning if you're on a case-insensitive filesystem and have
not specified --with-suffix.
- Don't require --with-dyld, it is now default for OSX/Darwin (suggested
by Martin v. Loewis)
- Don't define _POSIX_THREADS on Darwin, it's done by standard headers already
(fix by Tony Lownds)
- Don't use the Mac subtree anymore, the routines relevant to OSX/Darwin
have moved to a new file Python/mactoolboxglue.c.
the --with-suffix=.exe, but it seems that that is also true for cygwin
(or not? should I automatically set it?)
- Got --with-next-framework to build on OSX. This is only the build bit,
the install still has to be done manually. Moreover, the Python build order
isn't really suited to frameworks (where you want to do 'build lib',
'install lib and framework', 'link executable against installed framework'
in that order).
Also note that it isn't just Linux nice() that is broken: at least FreeBSD
and BSDI also have this problem. os.nice() should probably just be emulated
using getpriority()/setpriority(), if they are available, but I'll get to
that later.
This patch allows the readline module to build cleanly with GNU
readline 4.2 without breaking the build for earlier GNU readline
versions. The configure script checks for the presence of
rl_completion_matches in libreadline.
Add configure option --enable-unicode.
Add config.h macros Py_USING_UNICODE, PY_UNICODE_TYPE, Py_UNICODE_SIZE,
SIZEOF_WCHAR_T.
Define Py_UCS2.
Encode and decode large UTF-8 characters into single Py_UNICODE values
for wide Unicode types; likewise for UTF-16.
Remove test whether sizeof Py_UNICODE is two.
Mac/macglue.c into the core interpreter. This file contains the glue code that
allows extension modules for Mac toolboxes to live in different shared libraries
but still communicate with each other. The glue code is controlled by the
USE_MAC_TOOLBOX_GLUE define.
into Makefile.pre.in; the configure script will only determine the basename
of the file.
This fixes installation of a Python built using C++, reported by Greg
Wilson.
-shared does the following things:
- invoke the linker with -G -dy -z text (the latter only if
-mimpure-text was not given)
- drop crt1.o from the list of objects being linked
- drop -lc from the list of libraries being linked
OTOH, -G is just passed through to the linker.
The things that -shared does are necessary: crt1.o defines _start, and
requires main, so it should not be present in a shared library.
Likewise, -z text should be used to detect position-dependent code at
compile time.
Compile shared object files using -fPIC option when using GCC on Solaris (SF
patch #103865). Closes bug #132783. Move config.c generated by makesetup to
the Modules directory.
- Add CFLAGSFORSHARED variable. configure sets this to CCSHARED if LDLIBRARY
is a shared library.
- Remove -fPIC from OPT, it has no business there.
- Change CCSHARED option for Linux to -fPIC. It should probably be
-fPIC on a few other platforms as well.
- Don't create silly boot Makefile, create Setup files and run makesetup
instead.
- change EXE to EXTEXT, there is an autoconf macro for it
- use PROG_INSTALL macro rather than always using install-sh
- add option to disable signal module (simplifies the makefile)
- create subdirs for object files (when building out of src dir)
- don't generate subdir makefiles
- generate "boot" makefile
by weird and (hopefully) unnecessary SET_CXX and SET_DLLLIBRARY macros
that occurr at the start of Makefile.in files.
- Also removed the already-commented-out SET_CCC macro cruft.
builds during which he forgot to uncomment crucial library lines in
Setup, walks into Guido's East End nightclub with a tactical nuclear
weapon on his shoulder. Said nuclear weapon is promptly deployed
exactly where it will do the most good, right in the middle of
configure.in.
With this patch, the set of libraries autoconfigured in is extended to
include ndbm, gdbm, and crypt. This essentially eliminates any need to
tweak Setup for a normal Linux build.
"'E was a fair man. Cruel, but fair."
when configure detects the presence of termios.h; later we'll use this
for correct configuration of edline/readline.
Also, fix a bug in acconfig.h -- somebody forgot to add an undef to
cover the LIBNDBM configure symbol, which was preventing autoheader
from working properly.
of dbmmodule dynamically by default (otherwise it can pull in
dependencies with libdb that croak pybsddb3). This change moves the
Setup line for dbmmodule to Setup.config.in.
- when compiling with GCC on Solaris, use "$(CC) -shared" instead
of "$(CC) -G" to generate .so files
- when compiling with GCC on any platform, add "-fPIC" to OPT
(without this, "$(CC) -shared" dies horribly)
regardless of whether the system getopt() does what we want. This avoids the
hassle with prototypes and externs, and the check to see if the system
getopt() does what we want. Prefix optind, optarg and opterr with _PyOS_ to
avoid name clashes. Add new include file to define the right symbols. Fix
Demo/pyserv/pyserv.c to include getopt.h itself, instead of relying on
Python to provide it.
-Wstrict-prototypes options. This will make it a lot easier to keep
warnings under control in the first place in the future.
There is one known warning at this time, caught by the -Wstrict-prototypes
option. In Modules/main.c, the declaration of getopt() without parameters
gets a complaint (rightly) that it is not a proper prototype. The lack of
a complete prototype information should be corrected when the right
portability conditions have been identified.
Approved by the Guido.
Tony Lownds: [ Patch #101816 ] Fixes shared modules on Mac OS X
1. Mac OS X is recognized by the Next-ish host recognition code as
"Darwin/1.2"
2. When specifying just --with-dyld, modules can compile as shared
3. --with-dyld and --with-next-framework, modules can compile as
shared
4. --with-suffix=.exe, and Lib/plat-darwin1.2 is being made, the regen
script invokes python as python.exe
[I had to reformat this patch a bit to make it work. Please test!]
Dan Wolfe: [ Patch #101823 ] Fix Darwin POSIX Thread redefinition
The patch below fixes the redefinition problem in Darwin with
_POSIX_THREADS. I'm not sure if this is the correct long term fix but
for now it fixes the problem and the fix is specific to Darwin.
Dan Wolfe: [ Patch #101824 ] On Darwin, remove unrecognized option
`-OPT:Olimit=0'
After many, many, many compiles, I finally got itchy of this warning
cluttering up the output... so I scratched (Darwin configs only) and
it's gone! :-)
test -d "$directory"
to
test ! -z "directory" -a -d "directory"
Apparently, on SunOS 4.1.4_JL (and other?) OSes, -d on an empty string
always returns true. This closes SF bug #115392.
-D_HPUX_SOURCE and also turns on long long support.
Suggestion by stnor@sweden.hp.com (Stefan Norberg).
Please test this if you have access to HP-UX!!!
I can't test this, so I'm just checking it in with blind faith in Andy.
I've tested that it doesn't broeak a non-Pth build on Linux.
Changes include:
- There's a --with-pth configure option.
- Instead of _GNU_PTH, we test for HAVE_PTH.
- Better signal handling.
- (The config.h.in file is regenerated in a slightly different order.)
This allows dbmmodule.c to use either without having to add additional
options to the Modules/Setup file or make source changes.
(At least some Linux systems use gdbm to emulate ndbm, but only install
the ndbm.h header as /usr/include/gdbm/ndbm.h.)
enable it), but db.h was not found, the WITH_LIBDB macros was still being
defined, resulting in compilation errors. Also added a short explain when
bsddb support wasn't enabled (because db.h wasn't found) when the user
explicitly used --with-libdb on the configure command line.
Update the build structures to automatically detect the presence of BSD db,
including the proper name of the header file to include. Has all the
expected niceties associated with yet-more-configure-options. ;)
This checkin includes changes for non-generated files only; subsequent
checkin will catch those.
This is part of SourceForge patch #101272.
- Fix bug in thread_pthread.h::PyThread_get_thread_ident() where
sizeof(pthread) < sizeof(long).
- Add 'configure' for:
- SIZEOF_PTHREAD is pthread_t can be included via <pthread.h>
- setting Monterey system name
- appropriate CC,LINKCC,LDSHARED,OPT, and CCSHARED for Monterey
- Add section in README for Monterey build
which I can cast void* to and back again without losing information".
In pyport.h, we typedef Py_uintptr_t to mean this thing, which if the
platform supports, will be uintptr_t (otherwise, other accomodations
are made).
- Don't call both AC_CHECK_FUNCS and AC_REPLACE_FUNC for 'hypot', as the
latter already does everything the former does (because it's implemented as
a call to the former.)
- Don't call AC_CHECK_FUNC() without any 'action' clauses or with an action
clause that just defines HAVE_<function>. Instead, call AC_CHECK_FUNCS,
which defines 'HAVE_<function>' of itself, possibly with aditional 'action'
clauses.
No checks are removed by this patch, only moved around, and some duplicates
are removed.
Patch by Thomas Wouters <thomas@xs4all.net> with small changes of mine
(in main(), use return instead of exit).
Closes patch #100832
(but I can't assign it to myself, nor close it -- sorry)
disables it. The gc test is moved to just after the thread test, as
is the wctype-functions test.
Modules/Setup.config is generated instead of Modules/Setup.thread.
Applied SF patch #100684 (loewis) to fix help alignment bug.
64-bit readiness (the config values are needed for patches that I will
be submitting later today. The changes are as follows:
- add SIZEOF_OFF_T #define's to PC/config.h (it was already in configure.in)
- add SIZEOF_TIME_T #define to PC/config.h and configure
Needed for some buffer overflow checking because sizeof(time_t) is
different on Win64.
- add SIZEOF_FPOS_T #define
Needed for the Win64 large file support implementation.
- add SIZEOF_HKEY in PC/config.h only
Needed for proper Win32 vs. Win64 handling in PC/winreg.c
- #define HAVE_LARGEFILE_SUPPORT for Win64
- typedef long intptr_t; for all Windows except Win64 (which defines it
itself)
This is a new ANSI (I think) type that is useful (and used by me) for
proper handling in msvcrtmodule.c and posixmodule.c
- indent the nested #ifdef's and #defines in PC/config.h
This is *so* much more readable. There cannot be a compiler
compatibilty issue here can there? Perl uses indented #defines and it
compiles with everything.
threads use --without-threads. No extra tests of thread/compiler
combinations have been added.
--with(out)-thread and --with(out)-threads are completely
interchangeable.
--with-threads still supports the =DIRECTORY option for specifying
where to find thread libraries.
This patch adds the openpty() and forkpty() library calls to posixmodule.c,
when they are available on the target
system. (glibc-2.1-based Linux systems, FreeBSD and BSDI at least, probably
the other BSD-based systems as well.)
Lib/pty.py is also rewritten to use openpty when available, but falls
back to the old SGI method or the "manual" BSD open-a-pty
code. Openpty() is necessary to use the Unix98 ptys under Linux 2.2,
or when using non-standard tty names under (at least) BSDI, which is
why I needed it, myself ;-) forkpty() is included for symmetry.
create shared extensions rather than 'ld -G'. This ensures that shared
extensions link against libgcc.a, in case there are any functions in the
GCC runtime not already in the Python core.
Solaris 2 has stub implementations of the POSIX thread functions such as
pthread_detach in libc. This means that configure tries to use them without
-lpthread, then the test of pthread_create fails and the configuration
falls back to the Solaris thread library. This patch moves the test for
pthread_create in -lpthread ahead of the test for pthread_detach in libc.
The patch also ensures that -lpthread is at the start of the library list
when linking, to pick up POSIX thread semantics for fork (see below).
Justification.
Use of POSIX threads on Solaris ensures that the fork() call only runs the
thread that called fork() in the child. This is desirable to prevent (for
example) parent server or database threads running in the child. Sun's
-lthread library uses a traditional fork() which replicates all the
parent's threads in the child. I find this undesirable.
Digression.
The configure.in seems to always test for -lthread even if a POSIX library
is found. I'm not enough of a configure.in wizard to decide whether this is
desirable or how to fix it. It is also irrelevant to this patch - I just
spotted it while testing.
End of Digression.
least on Solaris (sometimes it's Unix98, sometimes it conforms to an
early draft).
Properly generate config.h.in using autoheader instead of editing it
manually; thanks, Guido!
Duzan, for AIX, to support C++ objects with static initializers, when
using the genuine IBM C++ compiler (namely xlC/xlC_r).
See accompanying patches to acconfig.h and importdl.c.
The following patches (relative to 1.5.2b1) enable Python dynamic
loading to work on NetBSD platforms that use ELF (presnetly mips and
alpha systems). They automaticly determine wether the system is ELF or
a.out rather than using astatic list of platforms so that when other
NetBSD platforms move to ELF, python will continue to work without
change.
Added AC_CHECK_SIZEOF(void *).
Added yet another test for pthreads (pthread_create may be in libc).
Added pthread_init to list of functions whose existence is checked.
(1) reorder the tests for -Olimit 1500 and -OPT:Olimit=0 so that the
latter test is performed first, and if it works, the former test is
skipped. This should get rid of the problem that the new SGI
compilers accept both but emit a warning about -Olimit 1500.
(2) The DGUX hack was somehow split in two by the Olimit tests,
probably as the result of a non-context diff. Moved this back
together again, after the Olimit tests.