>>>> Stephen J Turnbull writes:
QUERY
>>>>> "Volker" == Volker Zell <Dr.> writes:
>
> Volker> Hi Here is a patch for auto detecting integer types. The
> Volker> cygwin version has the same problems as FreeBSD/NetBSD.
>
Can you explain exactly what the problem is? It seems clear from the
comments that the intent of that code is to override certain
definitions from inttypes.h to make them Berkeley db compatible.
(Possibly old versions of that header didn't contain them but that
seems kind of odd.)
Under cygwin when configuring and later compiling database.c I get:
configure:14345: gcc -c -g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes
-Wsign-compare -fno-strict-aliasing -Wshadow -Wpointer-arith -Wno-sign-compare
-fno-caller-saves -I/usr/X11/include conftest.c 1>&5
In file included from /usr/include/sys/types.h:379,
from /usr/include/db.h:25,
from configure:14338:
/usr/include/cygwin/types.h:183: error: conflicting types for 'u_int32_t'
configure:14332: error: previous declaration of 'u_int32_t' was here
configure: failed program was:
#line 14323 "configure"
#include "confdefs.h"
#include <stdlib.h>
#if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
#ifdef HAVE_INTTYPES_H
#define __BIT_TYPES_DEFINED__
#include <inttypes.h>
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
#ifdef WE_DONT_NEED_QUADS
typedef uint64_t u_int64_t;
#endif
#endif
#endif
#include <db.h>
int main() {
; return 0; }
These are the definitions from /usr/include/cygwin/types.h
#ifndef __u_int8_t_defined
#define __u_int8_t_defined
typedef unsigned char u_int8_t;
#endif
#ifndef __u_int16_t_defined
#define __u_int16_t_defined
typedef __uint16_t u_int16_t;
#endif
#ifndef __u_int32_t_defined
#define __u_int32_t_defined
typedef __uint32_t u_int32_t;
#endif
#ifndef __u_int64_t_defined
#define __u_int64_t_defined
typedef __uint64_t u_int64_t;
#endif
By the way we had this discussion already:
http://list-archive.xemacs.org/xemacs-patches/200505/msg00027.html
http://list-archive.xemacs.org/xemacs-patches/200505/msg00029.html
http://list-archive.xemacs.org/xemacs-patches/200505/msg00065.html
http://list-archive.xemacs.org/xemacs-patches/200505/msg00067.html
However, on Linux and Mac OS X I can't find any db.h that would
cause
any problem; they all just use the types as defined in inttypes.h.
>
> Volker> Also included is a patch which avoids using Motif for
> Volker> cygwin. This is needed because the latest gcc-3.4.4 for
> Volker> cygwin seems to produce an executable which runs fine but
> Volker> coredumps on every exit which is very annoying.
>
Er, what makes you think it's GCC-related? There is a whole set of
cross-platform Motif bugs that have this effect. Are you sure it's
not one of them?
Well I had to recompile the cygwin version of xemacs because of a name
change in one of the supporting libraries. Postgresql got updated in the
cygwin distro and pg.dll got renamed to cygpg.dll.
My last compiled version didn't crash on exit whereas the new one
consistently crashes. The only difference in my build environment
between these versions is a switch from gcc-3.3.3 to gcc-3.4.4 and to
the latest cygwin version of binutils.
But it's also possible that the cross-platform Motif bugs are the
culprit here.
I'm just as happy to get rid of Motif wherever possible, though.
With my patch, the default build of xemacs without any configure
switches and LessTif installed will now produce an executable which will
not crash whereas before support for Motif was compiled in using the
LessTif implementation.
Also the following warnigs printed in the shell from
where XEmacs got started are now gone:
Warning: XtRemoveGrab asked to remove a widget not on the list
Ciao
Volker