From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28916 invoked by alias); 18 Apr 2005 23:15:04 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28719 invoked from network); 18 Apr 2005 23:14:51 -0000 Received: from unknown (HELO e34.co.us.ibm.com) (32.97.110.132) by sourceware.org with SMTP; 18 Apr 2005 23:14:51 -0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e34.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j3INEoeE110354 for ; Mon, 18 Apr 2005 19:14:51 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j3INEoxw254106 for ; Mon, 18 Apr 2005 17:14:50 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j3INEo2T021305 for ; Mon, 18 Apr 2005 17:14:50 -0600 Received: from austin.ibm.com (netmail2.austin.ibm.com [9.41.248.176]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j3INEohY021292 for ; Mon, 18 Apr 2005 17:14:50 -0600 Received: from lazy.austin.ibm.com (lazy.austin.ibm.com [9.53.94.97]) by austin.ibm.com (8.12.10/8.12.10) with ESMTP id j3INEneT027160 for ; Mon, 18 Apr 2005 18:14:49 -0500 Date: Mon, 18 Apr 2005 23:15:00 -0000 From: Manoj Iyer X-X-Sender: manjo@lazy To: gdb-patches@sources.redhat.com Subject: Re: [RFC] Use HAVE_LONGLONG instead of __GNUC__ to check for long long support. In-Reply-To: <20050418225239.GA26935@nevyn.them.org> Message-ID: References: <20050418225239.GA26935@nevyn.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2005-04/txt/msg00214.txt.bz2 Daniel, Used autoheader to generate the config.in file, but it does not look pretty, also, removed the comments that you did not like. 2005-04-18 Manoj Iyer * configure.ac: Added check for long long. * config.in: Regenerated. * configure: Regenerated. * words.h: Modified logic to check for HAVE_LONGLONG instead of __GNUC__, added config.h header file. --- src/sim/ppc/config.in 2004-09-24 13:39:41.000000000 -0500 +++ new/src/sim/ppc/config.in 2005-04-18 18:35:50.000000000 -0500 @@ -1,93 +1,11 @@ -/* config.in. Generated automatically from configure.in by autoheader. */ - -/* Define if using alloca.c. */ -#undef C_ALLOCA - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -#undef CRAY_STACKSEG_END - -/* Define to the type of elements in the array set by `getgroups'. - Usually this is either `int' or `gid_t'. */ -#undef GETGROUPS_T - -/* Define to `int' if doesn't define. */ -#undef gid_t - -/* Define if you have alloca, as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define if you have and it should be used (not on Ultrix). */ -#undef HAVE_ALLOCA_H - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if your struct stat has st_blksize. */ -#undef HAVE_ST_BLKSIZE - -/* Define if your struct stat has st_blocks. */ -#undef HAVE_ST_BLOCKS - -/* Define if your struct stat has st_rdev. */ -#undef HAVE_ST_RDEV - -/* Define if your struct tm has tm_zone. */ -#undef HAVE_TM_ZONE - -/* Define if you don't have tm_zone but do have the external array - tzname. */ -#undef HAVE_TZNAME - -/* Define as __inline if that's what the C compiler calls it. */ -#undef inline - -/* Define to `int' if doesn't define. */ -#undef mode_t - -/* Define to `long' if doesn't define. */ -#undef off_t - -/* Define to `int' if doesn't define. */ -#undef pid_t - -/* Define if you need to in order for stat and other things to work. */ -#undef _POSIX_SOURCE - -/* Define as the return type of signal handlers (int or void). */ -#undef RETSIGTYPE - -/* Define to `unsigned' if doesn't define. */ -#undef size_t - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -#undef STACK_DIRECTION - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if your declares struct tm. */ -#undef TM_IN_SYS_TIME - -/* Define to `int' if doesn't define. */ -#undef uid_t - -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN +/* config.in. Generated from configure.ac by autoheader. */ /* Define to 1 if NLS is requested. */ #undef ENABLE_NLS +/* Define as 1 if you have catgets and don't want to use GNU gettext. */ +#undef HAVE_CATGETS + /* Define as 1 if you have gettext and don't want to use GNU gettext. */ #undef HAVE_GETTEXT @@ -97,276 +15,416 @@ /* Define if your locale.h file contains LC_MESSAGES. */ #undef HAVE_LC_MESSAGES -/* Define if you have the __argz_count function. */ -#undef HAVE___ARGZ_COUNT +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END -/* Define if you have the __argz_next function. */ -#undef HAVE___ARGZ_NEXT +/* Define to 1 if using `alloca.c'. */ +#undef C_ALLOCA -/* Define if you have the __argz_stringify function. */ -#undef HAVE___ARGZ_STRINGIFY +/* Define to 1 if NLS is requested */ +#undef ENABLE_NLS + +/* Define to the type of elements in the array set by `getgroups'. Usually + this is either `int' or `gid_t'. */ +#undef GETGROUPS_T -/* Define if you have the access function. */ +/* Define to 1 if you have the `access' function. */ #undef HAVE_ACCESS -/* Define if you have the cfgetispeed function. */ +/* Define to 1 if you have `alloca', as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#undef HAVE_ALLOCA_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARGZ_H + +/* Define to 1 if you have the `cfgetispeed' function. */ #undef HAVE_CFGETISPEED -/* Define if you have the cfgetospeed function. */ +/* Define to 1 if you have the `cfgetospeed' function. */ #undef HAVE_CFGETOSPEED -/* Define if you have the cfsetispeed function. */ +/* Define to 1 if you have the `cfsetispeed' function. */ #undef HAVE_CFSETISPEED -/* Define if you have the cfsetospeed function. */ +/* Define to 1 if you have the `cfsetospeed' function. */ #undef HAVE_CFSETOSPEED -/* Define if you have the chdir function. */ +/* Define to 1 if you have the `chdir' function. */ #undef HAVE_CHDIR -/* Define if you have the chmod function. */ +/* Define to 1 if you have the `chmod' function. */ #undef HAVE_CHMOD -/* Define if you have the chown function. */ +/* Define to 1 if you have the `chown' function. */ #undef HAVE_CHOWN -/* Define if you have the dcgettext function. */ +/* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT -/* Define if you have the dup function. */ +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the `dup' function. */ #undef HAVE_DUP -/* Define if you have the dup2 function. */ +/* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 -/* Define if you have the fchmod function. */ +/* Define to 1 if you have the `fchmod' function. */ #undef HAVE_FCHMOD -/* Define if you have the fchown function. */ +/* Define to 1 if you have the `fchown' function. */ #undef HAVE_FCHOWN -/* Define if you have the fcntl function. */ +/* Define to 1 if you have the `fcntl' function. */ #undef HAVE_FCNTL -/* Define if you have the fstat function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `fstat' function. */ #undef HAVE_FSTAT -/* Define if you have the fstatfs function. */ +/* Define to 1 if you have the `fstatfs' function. */ #undef HAVE_FSTATFS -/* Define if you have the getcwd function. */ +/* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD -/* Define if you have the getdirentries function. */ +/* Define to 1 if you have the `getdirentries' function. */ #undef HAVE_GETDIRENTRIES -/* Define if you have the getegid function. */ +/* Define to 1 if you have the `getegid' function. */ #undef HAVE_GETEGID -/* Define if you have the geteuid function. */ +/* Define to 1 if you have the `geteuid' function. */ #undef HAVE_GETEUID -/* Define if you have the getgid function. */ +/* Define to 1 if you have the `getgid' function. */ #undef HAVE_GETGID -/* Define if you have the getpagesize function. */ +/* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE -/* Define if you have the getpid function. */ +/* Define to 1 if you have the `getpid' function. */ #undef HAVE_GETPID -/* Define if you have the getppid function. */ +/* Define to 1 if you have the `getppid' function. */ #undef HAVE_GETPPID -/* Define if you have the getrusage function. */ +/* Define to 1 if you have the `getrusage' function. */ #undef HAVE_GETRUSAGE -/* Define if you have the gettimeofday function. */ +/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +#undef HAVE_GETTEXT + +/* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY -/* Define if you have the getuid function. */ +/* Define to 1 if you have the `getuid' function. */ #undef HAVE_GETUID -/* Define if you have the ioctl function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `ioctl' function. */ #undef HAVE_IOCTL -/* Define if you have the kill function. */ +/* Define to 1 if you have the `kill' function. */ #undef HAVE_KILL -/* Define if you have the link function. */ +/* Define if your locale.h file contains LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the `link' function. */ #undef HAVE_LINK -/* Define if you have the lseek function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define if compiler supports long long. */ +#undef HAVE_LONGLONG + +/* Define to 1 if you have the `lseek' function. */ #undef HAVE_LSEEK -/* Define if you have the lstat function. */ +/* Define to 1 if you have the `lstat' function. */ #undef HAVE_LSTAT -/* Define if you have the mkdir function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR -/* Define if you have the munmap function. */ +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP -/* Define if you have the pipe function. */ +/* Define to 1 if you have the header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NL_TYPES_H + +/* Define to 1 if you have the `pipe' function. */ #undef HAVE_PIPE -/* Define if you have the putenv function. */ +/* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV -/* Define if you have the readlink function. */ +/* Define to 1 if you have the `readlink' function. */ #undef HAVE_READLINK -/* Define if you have the rmdir function. */ +/* Define to 1 if you have the `rmdir' function. */ #undef HAVE_RMDIR -/* Define if you have the setenv function. */ +/* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV -/* Define if you have the setlocale function. */ +/* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE -/* Define if you have the setregid function. */ +/* Define to 1 if you have the `setregid' function. */ #undef HAVE_SETREGID -/* Define if you have the setreuid function. */ +/* Define to 1 if you have the `setreuid' function. */ #undef HAVE_SETREUID -/* Define if you have the sigprocmask function. */ +/* Define to 1 if you have the `sigprocmask' function. */ #undef HAVE_SIGPROCMASK -/* Define if you have the stat function. */ +/* Define to 1 if you have the `stat' function. */ #undef HAVE_STAT -/* Define if you have the stpcpy function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define if you have the stpcpy function */ #undef HAVE_STPCPY -/* Define if you have the strcasecmp function. */ +/* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP -/* Define if you have the strchr function. */ +/* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR -/* Define if you have the symlink function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define if struct statfs is defined in */ +#undef HAVE_STRUCT_STATFS + +/* Define to 1 if `st_blksize' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BLKSIZE + +/* Define to 1 if `st_blocks' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BLOCKS + +/* Define to 1 if `st_rdev' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_RDEV + +/* Define to 1 if `tm_zone' is member of `struct tm'. */ +#undef HAVE_STRUCT_TM_TM_ZONE + +/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use + `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ +#undef HAVE_ST_BLKSIZE + +/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use + `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */ +#undef HAVE_ST_BLOCKS + +/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use + `HAVE_STRUCT_STAT_ST_RDEV' instead. */ +#undef HAVE_ST_RDEV + +/* Define to 1 if you have the `symlink' function. */ #undef HAVE_SYMLINK -/* Define if you have the tcdrain function. */ +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MOUNT_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TERMIOS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TERMIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIMES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VFS_H + +/* Define to 1 if you have the `tcdrain' function. */ #undef HAVE_TCDRAIN -/* Define if you have the tcflow function. */ +/* Define to 1 if you have the `tcflow' function. */ #undef HAVE_TCFLOW -/* Define if you have the tcflush function. */ +/* Define to 1 if you have the `tcflush' function. */ #undef HAVE_TCFLUSH -/* Define if you have the tcgetattr function. */ +/* Define to 1 if you have the `tcgetattr' function. */ #undef HAVE_TCGETATTR -/* Define if you have the tcgetpgrp function. */ +/* Define to 1 if you have the `tcgetpgrp' function. */ #undef HAVE_TCGETPGRP -/* Define if you have the tcsendbreak function. */ +/* Define to 1 if you have the `tcsendbreak' function. */ #undef HAVE_TCSENDBREAK -/* Define if you have the tcsetattr function. */ +/* Define to 1 if you have the `tcsetattr' function. */ #undef HAVE_TCSETATTR -/* Define if you have the tcsetpgrp function. */ +/* Define to 1 if you have the `tcsetpgrp' function. */ #undef HAVE_TCSETPGRP -/* Define if you have the time function. */ +/* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define if you have the umask function. */ -#undef HAVE_UMASK - -/* Define if you have the unlink function. */ -#undef HAVE_UNLINK - -/* Define if you have the header file. */ -#undef HAVE_ARGZ_H - -/* Define if you have the header file. */ -#undef HAVE_DIRENT_H - -/* Define if you have the header file. */ -#undef HAVE_FCNTL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_TIME_H -/* Define if you have the header file. */ -#undef HAVE_LIMITS_H +/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use + `HAVE_STRUCT_TM_TM_ZONE' instead. */ +#undef HAVE_TM_ZONE -/* Define if you have the header file. */ -#undef HAVE_LOCALE_H +/* Define to 1 if you don't have `tm_zone' but do have the external array + `tzname'. */ +#undef HAVE_TZNAME -/* Define if you have the header file. */ -#undef HAVE_MALLOC_H +/* Define to 1 if you have the `umask' function. */ +#undef HAVE_UMASK -/* Define if you have the header file. */ -#undef HAVE_NDIR_H +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H -/* Define if you have the header file. */ -#undef HAVE_NL_TYPES_H +/* Define to 1 if you have the `unlink' function. */ +#undef HAVE_UNLINK -/* Define if you have the header file. */ -#undef HAVE_STDLIB_H +/* Define to 1 if you have the header file. */ +#undef HAVE_VALUES_H -/* Define if you have the header file. */ -#undef HAVE_STRING_H +/* Define to 1 if you have the `__argz_count' function. */ +#undef HAVE___ARGZ_COUNT -/* Define if you have the header file. */ -#undef HAVE_STRINGS_H +/* Define to 1 if you have the `__argz_next' function. */ +#undef HAVE___ARGZ_NEXT -/* Define if you have the header file. */ -#undef HAVE_SYS_DIR_H +/* Define to 1 if you have the `__argz_stringify' function. */ +#undef HAVE___ARGZ_STRINGIFY -/* Define if you have the header file. */ -#undef HAVE_SYS_IOCTL_H +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT -/* Define if you have the header file. */ -#undef HAVE_SYS_MOUNT_H +/* Define to the full name of this package. */ +#undef PACKAGE_NAME -/* Define if you have the header file. */ -#undef HAVE_SYS_NDIR_H +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING -/* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME -/* Define if you have the header file. */ -#undef HAVE_SYS_RESOURCE_H +/* Define to the version of this package. */ +#undef PACKAGE_VERSION -/* Define if you have the header file. */ -#undef HAVE_SYS_STAT_H +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE -/* Define if you have the header file. */ -#undef HAVE_SYS_STATFS_H +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION -/* Define if you have the header file. */ -#undef HAVE_SYS_TERMIO_H +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS -/* Define if you have the header file. */ -#undef HAVE_SYS_TERMIOS_H +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME -/* Define if you have the header file. */ -#undef HAVE_SYS_TIME_H +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN -/* Define if you have the header file. */ -#undef HAVE_SYS_TIMES_H +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const -/* Define if you have the header file. */ -#undef HAVE_SYS_TYPES_H +/* Define to `int' if doesn't define. */ +#undef gid_t -/* Define if you have the header file. */ -#undef HAVE_SYS_VFS_H +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif -/* Define if you have the header file. */ -#undef HAVE_TIME_H +/* Define to `int' if does not define. */ +#undef mode_t -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H +/* Define to `long' if does not define. */ +#undef off_t -/* Define if you have the header file. */ -#undef HAVE_VALUES_H +/* Define to `int' if does not define. */ +#undef pid_t -/* Define if struct statfs is defined in */ -#undef HAVE_STRUCT_STATFS +/* Define to `unsigned' if does not define. */ +#undef size_t +/* Define to `int' if doesn't define. */ +#undef uid_t ----------------------------------------------------------------------- --- src/sim/ppc/configure.ac 2005-01-12 10:23:21.000000000 -0600 +++ new/src/sim/ppc/configure.ac 2005-04-18 18:34:10.000000000 -0500 @@ -681,6 +681,9 @@ if test $ac_cv_struct_statfs = yes; then [Define if struct statfs is defined in ]) fi +AC_CHECK_TYPE(long long, + AC_DEFINE(HAVE_LONGLONG, 1, [Define if compiler supports long long.]),) + dnl Figure out if /dev/zero exists or not sim_devzero="" AC_MSG_CHECKING(for /dev/zero) ----------------------------------------------------------------- --- src/sim/ppc/words.h 1999-04-15 20:35:12.000000000 -0500 +++ new/src/sim/ppc/words.h 2005-04-18 18:34:24.000000000 -0500 @@ -43,6 +43,9 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* bit based */ typedef char natural8; @@ -57,7 +60,7 @@ typedef unsigned char unsigned8; typedef unsigned short unsigned16; typedef unsigned long unsigned32; -#ifdef __GNUC__ +#ifdef HAVE_LONGLONG typedef long long natural64; typedef signed long long signed64; typedef unsigned long long unsigned64; Thanks ----- manjo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Cogito ergo sum + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ On Mon, 18 Apr 2005, Daniel Jacobowitz wrote: > On Mon, Apr 18, 2005 at 06:14:47PM -0500, Manoj Iyer wrote: > > > > Here is a patch to use HAVE_LONGLONG instead of using __GNUC__ for > > checking for long long support in compiler. When using a non-gnu compiler > > (xlc), natural64, signed64 and unsigned64 are undefined. Please review > > patch and approve for commit. > > > > > > 2005-04-18 Manoj Iyer > > * configure.ac: Added check for long long. > > * config.in: Added define for HAVE_LONGLONG. > > This is a generated file; run autoheader instead. > > > * configure: Regenerated. > > * words.h: Modified logic to check for HAVE_LONGLONG instead of > > __GNUC__, added config.h header file. > > > > > > diff -Naurp src/sim/ppc/config.in new/src/sim/ppc/config.in > > --- src/sim/ppc/config.in 2004-09-24 13:39:41.000000000 -0500 > > +++ new/src/sim/ppc/config.in 2005-04-18 18:03:37.000000000 -0500 > > @@ -298,6 +298,9 @@ > > /* Define if you have the header file. */ > > #undef HAVE_LOCALE_H > > > > +/* Define if compiler supports long long type. */ > > +#undef HAVE_LONGLONG > > + > > /* Define if you have the header file. */ > > #undef HAVE_MALLOC_H > > > > diff -Naurp src/sim/ppc/configure.ac new/src/sim/ppc/configure.ac > > --- src/sim/ppc/configure.ac 2005-01-12 10:23:21.000000000 -0600 > > +++ new/src/sim/ppc/configure.ac 2005-04-18 18:01:58.000000000 -0500 > > @@ -681,6 +681,10 @@ if test $ac_cv_struct_statfs = yes; then > > [Define if struct statfs is defined in ]) > > fi > > > > +dnl check for long long > > +AC_CHECK_TYPE(long long, > > + AC_DEFINE(HAVE_LONGLONG, 1, [does compiler supports long long]),) > > + > > [Define if the compiler supports long long.] You don't need the dnl, > or the comment above #include "config.h"; don't add comments that just > rephrase the following line. > > -- > Daniel Jacobowitz > CodeSourcery, LLC >