bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug in AC_TYPE_UINT32_T on Solaris 2.5.1


From: Bruno Haible
Subject: bug in AC_TYPE_UINT32_T on Solaris 2.5.1
Date: Sat, 17 Jun 2006 19:37:45 +0200
User-agent: KMail/1.9.1

Hi,

The types uint8_t, uint32_t, defined by autoconf-2.59d
AC_TYPE_UINT32_T etc. collide with the types defined in <pthread.h>
on that platform.

Find attached a test project. On a Solaris 2.5.1 machine:

$ echo $PATH
/usr/bin/X11:/bin:/usr/bin:/usr/sbin:/opt/bin:/usr/ccs/bin
$ cd testdir
$ ./configure
checking for a BSD-compatible install... build-aux/install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gcc... no
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of cc... none
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/xpg4/bin/grep
checking for egrep... /usr/xpg4/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... yes
checking for uint8_t... unsigned char
checking for uint16_t... unsigned short int
checking for uint32_t... unsigned int
checking for unsigned long long int... yes
checking for uintmax_t... no
checking for uintptr_t... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
$ make
make  all-am
cc -DHAVE_CONFIG_H -I. -I. -I.      -g -c test1.c
"/usr/include/pthread.h", line 27: invalid type combination
"/usr/include/pthread.h", line 27: invalid type combination
"/usr/include/pthread.h", line 27: warning: useless declaration
"/usr/include/pthread.h", line 27: warning: typedef declares no type name
cc: acomp failed for test1.c
*** Error code 2
make: Fatal error: Command failed for target `test1.o'

pthread.h looks like this:

#ifndef _UINT8_T
typedef unsigned char   uint8_t;
#define _UINT8_T
#endif
#ifndef _UINT32_T
typedef unsigned long   uint32_t;
#define _UINT32_T
#endif
#ifndef _UINT64_T
typedef u_longlong_t    uint64_t;
#define _UINT64_T
#endif

Therefore I'd suggest to define _UINT32_T at the same time you define
uint32_t, and similarly for the others. Including <pthread.h> in the
test would probably lead to trouble on some other platforms (think
of _REENTRANT or -lc_r ...).

Bruno

Attachment: testdir.tar.bz2
Description: application/tbz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]