Must output the GLIB_USING_SYSTEM_PRINTF to glibconfig.h using the same

2008-07-24  Tor Lillqvist  <tml@novell.com>

	* configure.in: Must output the GLIB_USING_SYSTEM_PRINTF to
	glibconfig.h using the same two phase code as for the other
	defines in it. Can't check enable_included_printf directly in the
	shell code that is the first argument to AC_CONFIG_COMMANDS().

	Preset glib_cv_stack_grows=no on Windows to help
	cross-compilation.

	* configure.in: Enhancements for 64-bit Windows: 

	Handle also size_t being larger than long. It is long long
	a.k.a. __int64 on the LLP64 Win64.

	Set glib_void_p and glib_long correctly. Their assignments were
	crossed. It hasn't mattered on LP64 platforms like all (?) 64-bit
	UNIXes, but on the LLP Win64 it was wrong.


svn path=/trunk/; revision=7248
This commit is contained in:
Tor Lillqvist 2008-07-24 00:29:56 +00:00 committed by Tor Lillqvist
parent d395b1dcda
commit c023cc94f8
2 changed files with 40 additions and 5 deletions

View File

@ -1,5 +1,22 @@
2008-07-24 Tor Lillqvist <tml@novell.com>
* configure.in: Must output the GLIB_USING_SYSTEM_PRINTF to
glibconfig.h using the same two phase code as for the other
defines in it. Can't check enable_included_printf directly in the
shell code that is the first argument to AC_CONFIG_COMMANDS().
Preset glib_cv_stack_grows=no on Windows to help
cross-compilation.
* configure.in: Enhancements for 64-bit Windows:
Handle also size_t being larger than long. It is long long
a.k.a. __int64 on the LLP64 Win64.
Set glib_void_p and glib_long correctly. Their assignments were
crossed. It hasn't mattered on LP64 platforms like all (?) 64-bit
UNIXes, but on the LLP Win64 it was wrong.
* glibconfig.h.win32.in: Check also _WIN64.
2008-07-24 Tor Lillqvist <tml@novell.com>

View File

@ -119,6 +119,7 @@ case "$host" in
*-*-mingw*)
glib_native_win32=yes
glib_pid_type='void *'
glib_cv_stack_grows=no
# Unfortunately the mingw implementations of C99-style snprintf and vsnprintf
# don't seem to be quite good enough, at least not in mingw-runtime-3.14.
# (Sorry, I don't know exactly what is the problem, but it is related to
@ -880,6 +881,12 @@ case $ac_cv_sizeof_size_t in
$ac_cv_sizeof_long)
glib_size_type=long
;;
$ac_cv_sizeof_long_long)
glib_size_type='long long'
;;
$ac_cv_sizeof__int64)
glib_size_type='__int64'
;;
*) AC_MSG_ERROR([No type matching size_t in size])
;;
esac
@ -2632,7 +2639,7 @@ _______EOF
if test x$glib_sys_poll_h = xyes; then
echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
fi
if test x$enable_included_printf != xyes; then
if test x$glib_included_printf != xyes; then
echo "
/* Specifies that GLib's g_print*() functions wrap the
* system printf functions. This is useful to know, for example,
@ -2991,6 +2998,10 @@ if test x$ac_cv_header_sys_poll_h = xyes ; then
glib_sys_poll_h=yes
fi
if test x$enable_included_printf = xyes ; then
glib_included_printf=yes
fi
case 2 in
$ac_cv_sizeof_short)
gint16=short
@ -3068,11 +3079,11 @@ $ac_cv_sizeof___int64)
;;
esac
glib_size_t=$ac_cv_sizeof_size_t
glib_size_type_define=$glib_size_type
glib_void_p=$ac_cv_sizeof_long
glib_long=$ac_cv_sizeof_void_p
glib_size_type_define="$glib_size_type"
glib_void_p=$ac_cv_sizeof_void_p
glib_long=$ac_cv_sizeof_long
case $glib_size_type in
case "$glib_size_type" in
short)
gsize_modifier='"h"'
gsize_format='"hu"'
@ -3091,6 +3102,12 @@ long)
gssize_format='"li"'
glib_msize_type='LONG'
;;
"long long"|__int64)
gsize_modifier='"I64"'
gsize_format='"I64u"'
gssize_format='"I64i"'
glib_msize_type='INT64'
;;
esac
gintbits=`expr $ac_cv_sizeof_int \* 8`
@ -3100,6 +3117,7 @@ glongbits=`expr $ac_cv_sizeof_long \* 8`
case $ac_cv_sizeof_void_p in
$ac_cv_sizeof_int) glib_gpi_cast='' glib_gpui_cast='' ;;
$ac_cv_sizeof_long) glib_gpi_cast='(glong)' glib_gpui_cast='(gulong)' ;;
$ac_cv_sizeof_long_long)glib_gpi_cast='(gint64)' glib_gpui_cast='(guint64)' ;;
*) glib_unknown_void_p=yes ;;
esac