>>>> Stephen J Turnbull writes:
APPROVE COMMIT 21.5
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.884
diff -u -U0 -r1.884 ChangeLog
--- ChangeLog 13 Nov 2005 10:48:01 -0000 1.884
+++ ChangeLog 16 Nov 2005 05:36:39 -0000
@@ -0,0 +1,4 @@
+2005-11-16 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * database.c: Don't redefine integer types for Mac OS X, either.
+
Index: src/database.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/database.c,v
retrieving revision 1.37
diff -u -r1.37 database.c
--- src/database.c 25 Oct 2005 11:16:22 -0000 1.37
+++ src/database.c 16 Nov 2005 04:24:10 -0000
@@ -47,7 +47,7 @@
#ifdef HAVE_INTTYPES_H
#define __BIT_TYPES_DEFINED__
#include <inttypes.h>
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) &&
!defined(__APPLE__)
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
Hi Steve
I already send a patch a couple of months ago for auto detecting integer
types. The cygwin version has the same problems as FreeBSD/NetBSD and as
it seems Mac OS. Here it is again.
Also included is a patch which avoids using Motif for cygwin. This is
needed because the latest gcc-3.4.4 for cygwin seems to produce an
executable which runs fine but coredumps on every exit which is very annoying.
There is also a patch for event-msw.c otherwise the cygwin version (with MS
windows support compiled in) will not compile. See the following
compiler error:
gcc -c -Wall -Wno-switch -Wundef -Wsign-compare -Wno-char-subscripts -Wpacked
-Wpointer-arith -Wunused-parameter -g -Demacs -I. -I/usr/src/xemacs-21.5.23/src
-DHAVE_CONFIG_H -fno-caller-saves -I/usr/X11/include
/usr/src/xemacs-21.5.23/src/event-msw.c
/usr/src/xemacs-21.5.23/src/event-msw.c: In function
`reinit_vars_of_event_mswindows':
/usr/src/xemacs-21.5.23/src/event-msw.c:5038: error: `dde_eval_pending' undeclared
(first use in this function)
/usr/src/xemacs-21.5.23/src/event-msw.c:5038: error: (Each undeclared identifier is
reported only once
/usr/src/xemacs-21.5.23/src/event-msw.c:5038: error: for each function it appears in.)
Ciao
Volker
------------ xemacs-21.5.23/ChangeLog -------------
2005-11-15 Dr. Volker Zell <Dr.Volker.Zell(a)oracle.com>
* configure.ac: Avoid using Motif also for cygwin
* configure.ac: Check for u_int*_t typedefs and use them in
Berkeley DB detection
------------ xemacs-21.5.23/src/ChangeLog -------------
2005-11-15 Dr. Volker Zell <Dr.Volker.Zell(a)oracle.com>
* config.h.in: New HAVE_U_INT*_T defines
* database.c: Only use u_int*_t typedefs if not already
defined
* event-msw.c (reinit_vars_of_event_mswindows): Declare
dde_eval_pending as static int.
diff -urN -x .build -x .inst -x .sinst xemacs-21.5.23-orig/configure.ac
xemacs-21.5.23/configure.ac
--- xemacs-21.5.23-orig/configure.ac 2005-10-24 23:01:08.000000000 +0200
+++ xemacs-21.5.23/configure.ac 2005-11-15 12:31:31.012054400 +0100
@@ -4089,7 +4089,7 @@
dnl Avoid using Motif :-(
case "$opsys" in
- *linux* | *darwin* | *bsd* ) lucid_prefers_motif="no" ;;
+ *linux* | *darwin* | *bsd* | cygwin* ) lucid_prefers_motif="no" ;;
* ) lucid_prefers_motif="yes" ;;
esac
@@ -5035,6 +5035,9 @@
"$enable_database_dbm" = "yes" && \
AC_DEFINE(HAVE_DBM)
+dnl Check for u_int*_t typedefs.
+AC_CHECK_TYPES([u_int8_t, u_int16_t, u_int32_t, u_int64_t])
+
dnl Check for Berkeley DB.
if test "$enable_database_berkdb" != "no"; then
AC_MSG_CHECKING(for Berkeley db.h)
@@ -5045,14 +5048,22 @@
#ifdef HAVE_INTTYPES_H
#define __BIT_TYPES_DEFINED__
#include <inttypes.h>
+#if !HAVE_U_INT8_T
typedef uint8_t u_int8_t;
+#endif
+#if !HAVE_U_INT16_T
typedef uint16_t u_int16_t;
+#endif
+#if !HAVE_U_INT32_T
typedef uint32_t u_int32_t;
+#endif
#ifdef WE_DONT_NEED_QUADS
+#if !HAVE_U_INT64_T
typedef uint64_t u_int64_t;
#endif
#endif
#endif
+#endif
#include <$header>
],[], db_h_file="$header"; break)
done
diff -urN -x .build -x .inst -x .sinst xemacs-21.5.23-orig/src/config.h.in
xemacs-21.5.23/src/config.h.in
--- xemacs-21.5.23-orig/src/config.h.in 2005-10-25 13:19:58.000000000 +0200
+++ xemacs-21.5.23/src/config.h.in 2005-11-15 12:31:31.162270400 +0100
@@ -505,6 +505,15 @@
/* Compile in support for DBM databases? May require libgdbm or libdbm. */
#undef HAVE_DBM
+/* Define to 1 if the system has the type `u_int8_t'. */
+#undef HAVE_U_INT8_T
+/* Define to 1 if the system has the type `u_int16_t'. */
+#undef HAVE_U_INT16_T
+/* Define to 1 if the system has the type `u_int32_t'. */
+#undef HAVE_U_INT32_T
+/* Define to 1 if the system has the type `u_int64_t'. */
+#undef HAVE_U_INT64_T
+
/* Compile in support for Berkeley DB style databases? May require libdb. */
#undef HAVE_BERKELEY_DB
/* Full #include file path for Berkeley DB's db.h */
diff -urN -x .build -x .inst -x .sinst xemacs-21.5.23-orig/src/database.c
xemacs-21.5.23/src/database.c
--- xemacs-21.5.23-orig/src/database.c 2005-10-25 13:16:22.000000000 +0200
+++ xemacs-21.5.23/src/database.c 2005-11-15 12:32:04.520236800 +0100
@@ -47,14 +47,20 @@
#ifdef HAVE_INTTYPES_H
#define __BIT_TYPES_DEFINED__
#include <inttypes.h>
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+#if !HAVE_U_INT8_T
typedef uint8_t u_int8_t;
+#endif
+#if !HAVE_U_INT16_T
typedef uint16_t u_int16_t;
+#endif
+#if !HAVE_U_INT32_T
typedef uint32_t u_int32_t;
+#endif
#ifdef WE_DONT_NEED_QUADS
+#if !HAVE_U_INT64_T
typedef uint64_t u_int64_t;
+#endif
#endif /* WE_DONT_NEED_QUADS */
-#endif /* __FreeBSD__ */
#endif /* HAVE_INTTYPES_H */
#endif /* !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1) */
/* Berkeley DB wants __STDC__ to be defined; else if does `#define const' */
diff -urN -x .build -x .inst -x .sinst xemacs-21.5.23-orig/src/event-msw.c
xemacs-21.5.23/src/event-msw.c
--- xemacs-21.5.23-orig/src/event-msw.c 2005-10-25 13:16:23.000000000 +0200
+++ xemacs-21.5.23/src/event-msw.c 2005-11-15 12:31:31.202328000 +0100
@@ -5035,6 +5035,7 @@
mswindows_event_stream->current_event_timestamp_cb =
emacs_mswindows_current_event_timestamp;
+ static int dde_eval_pending;
dde_eval_pending = 0;
}