[Patches] changes to configure.in and PC/config.h for 64-bit systems
Trent Mick
trentm@activestate.com
Fri, 2 Jun 2000 14:18:24 -0700
On Fri, Jun 02, 2000 at 01:26:45PM -0700, Greg Stein wrote:
> On Fri, 2 Jun 2000, Trent Mick wrote:
> >...
> > If you would rather, I can submit the whole patch (for all the config system
> > files) together.
>
> It would be nice to see them all together again.
>
Here you go:
*** /home/trentm/main/contrib/python/dist/src/PC/config.h Thu Jun 1 00:13:40 2000
--- /home/trentm/main/Apps/Perlium/Python/dist/src/PC/config.h Thu Jun 1 12:47:45 2000
***************
*** 233,255 ****
/* End of compilers - finish up */
#if defined(MS_WIN64)
/* maintain "win32" sys.platform for backward compatibility of Python code,
the Win64 API should be close enough to the Win32 API to make this
preferable */
! #define PLATFORM "win32"
! #define SIZEOF_VOID_P 8
#elif defined(MS_WIN32)
! #define PLATFORM "win32"
! #ifdef _M_ALPHA
! #define SIZEOF_VOID_P 8
! #else
! #define SIZEOF_VOID_P 4
! #endif
#elif defined(MS_WIN16)
! #define PLATFORM "win16"
#else
! #define PLATFORM "dos"
#endif
--- 233,277 ----
/* End of compilers - finish up */
+ /* define the ANSI intptr_t type for portable use of a pointer sized
+ integer */
+ #include <basetsd.h>
+ #if defined(MS_WINDOWS) && !defined(MS_WIN64)
+ typedef long intptr_t;
+ #endif
+
#if defined(MS_WIN64)
/* maintain "win32" sys.platform for backward compatibility of Python code,
the Win64 API should be close enough to the Win32 API to make this
preferable */
! # define PLATFORM "win32"
! # define SIZEOF_VOID_P 8
! # define SIZEOF_TIME_T 8
! # define SIZEOF_OFF_T 4
! # define SIZEOF_FPOS_T 8
! # define SIZEOF_HKEY 8
! /* configure.in defines HAVE_LARGEFILE_SUPPORT iff HAVE_LONG_LONG,
! sizeof(off_t) > sizeof(long), and sizeof(LONG_LONG) >= sizeof(off_t).
! On Win64 the second condition is not true, but if fpos_t replaces off_t
! then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64
! should define this. */
! # define HAVE_LARGEFILE_SUPPORT
#elif defined(MS_WIN32)
! # define PLATFORM "win32"
! # ifdef _M_ALPHA
! # define SIZEOF_VOID_P 8
! # define SIZEOF_TIME_T 8
! # else
! # define SIZEOF_VOID_P 4
! # define SIZEOF_TIME_T 4
! # define SIZEOF_OFF_T 4
! # define SIZEOF_FPOS_T 8
! # define SIZEOF_HKEY 4
! # endif
#elif defined(MS_WIN16)
! # define PLATFORM "win16"
#else
! # define PLATFORM "dos"
#endif
*** /home/trentm/main/contrib/python/dist/src/configure.in Thu Jun 1 00:13:41 2000
--- /home/trentm/main/Apps/Perlium/Python/dist/src/configure.in Wed May 31 23:54:21 2000
***************
*** 1,5 ****
dnl Process this file with autoconf 2.0 or later to make a configure script.
! AC_REVISION($Revision: 1.124 $)
AC_PREREQ(2.0)
AC_INIT(Include/object.h)
AC_CONFIG_HEADER(config.h)
--- 1,5 ----
dnl Process this file with autoconf 2.0 or later to make a configure script.
! AC_REVISION($Revision: 1.125 $)
AC_PREREQ(2.0)
AC_INIT(Include/object.h)
AC_CONFIG_HEADER(config.h)
***************
*** 389,394 ****
--- 389,395 ----
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(float)
AC_CHECK_SIZEOF(double)
+ AC_CHECK_SIZEOF(fpos_t)
AC_MSG_CHECKING(for long long support)
have_long_long=no
***************
*** 423,428 ****
--- 424,445 ----
else
AC_MSG_RESULT(no)
fi
+
+ # AC_CHECK_SIZEOF() doesn't include <time.h>.
+ AC_MSG_CHECKING(size of time_t)
+ AC_CACHE_VAL(ac_cv_sizeof_time_t,
+ [AC_TRY_RUN([#include <stdio.h>
+ #include <time.h>
+ main()
+ {
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(time_t));
+ exit(0);
+ }], ac_cv_sizeof_time_t=`cat conftestval`, ac_cv_sizeof_time_t=0)
+ ])
+ AC_MSG_RESULT($ac_cv_sizeof_time_t)
+ AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t)
# Minor variations in building a framework between NextStep versions 4 and 5
*** /home/trentm/main/contrib/python/dist/src/acconfig.h Thu Jun 1 00:13:41 2000
--- /home/trentm/main/Apps/Perlium/Python/dist/src/acconfig.h Wed May 31 23:54:21 2000
***************
*** 151,156 ****
--- 151,159 ----
/* The number of bytes in an off_t. */
#undef SIZEOF_OFF_T
+ /* The number of bytes in a time_t. */
+ #undef SIZEOF_TIME_T
+
/* Defined to enable large file support when an off_t is bigger than a long
and long long is available and at least as big as an off_t. You may need
to add some flags for configuration and compilation to enable this mode.
*** /home/trentm/main/contrib/python/dist/src/config.h.in Thu Jun 1 00:13:41 2000
--- /home/trentm/main/Apps/Perlium/Python/dist/src/config.h.in Thu Jun 1 23:42:08 2000
***************
*** 213,218 ****
--- 213,221 ----
/* The number of bytes in an off_t. */
#undef SIZEOF_OFF_T
+ /* The number of bytes in a time_t. */
+ #undef SIZEOF_TIME_T
+
/* Defined to enable large file support when an off_t is bigger than a long
and long long is available and at least as big as an off_t. You may need
to add some flags for configuration and compilation to enable this mode.
***************
*** 234,239 ****
--- 237,245 ----
/* The number of bytes in a float. */
#undef SIZEOF_FLOAT
+ /* The number of bytes in a fpos_t. */
+ #undef SIZEOF_FPOS_T
+
/* The number of bytes in a int. */
#undef SIZEOF_INT
***************
*** 527,532 ****
--- 533,541 ----
/* Define if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
+
+ /* Define if you have the <sys/socket.h> header file. */
+ #undef HAVE_SYS_SOCKET_H
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
--
Trent Mick
trentm@activestate.com