From: Manoj Iyer <manjo@austin.ibm.com>
To: gdb-patches@sources.redhat.com
Subject: [RFC] Use HAVE_LONGLONG instead of __GNUC__ to check for long long support.
Date: Mon, 18 Apr 2005 22:41:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.58.0504181810220.29047@lazy> (raw)
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 <manjo@austin.ibm.com>
* configure.ac: Added check for long long.
* config.in: Added define for HAVE_LONGLONG.
* 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 <locale.h> header file. */
#undef HAVE_LOCALE_H
+/* Define if compiler supports long long type. */
+#undef HAVE_LONGLONG
+
/* Define if you have the <malloc.h> 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 <sys/mount.h>])
fi
+dnl check for long long
+AC_CHECK_TYPE(long long,
+ AC_DEFINE(HAVE_LONGLONG, 1, [does compiler supports long long]),)
+
dnl Figure out if /dev/zero exists or not
sim_devzero=""
AC_MSG_CHECKING(for /dev/zero)
diff -Naurp src/sim/ppc/words.h new/src/sim/ppc/words.h
--- src/sim/ppc/words.h 1999-04-15 20:35:12.000000000 -0500
+++ new/src/sim/ppc/words.h 2005-04-18 18:04:40.000000000 -0500
@@ -43,6 +43,10 @@
*/
+/* include configure generated definitions */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
/* bit based */
typedef char natural8;
@@ -57,7 +61,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 +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
next reply other threads:[~2005-04-18 22:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-18 22:41 Manoj Iyer [this message]
2005-04-18 22:52 ` Daniel Jacobowitz
2005-04-18 23:15 ` Manoj Iyer
2005-04-19 7:58 ` M.M. Kettenis
2005-04-19 9:54 ` Manoj Iyer
2005-04-19 10:24 ` [RFC] (Resubmit) " Manoj Iyer
2005-04-19 21:33 ` Manoj Iyer
2005-04-19 21:36 ` Daniel Jacobowitz
2005-04-19 21:48 ` Mark Kettenis
2005-04-19 21:50 ` Daniel Jacobowitz
2005-04-19 21:43 ` Mark Kettenis
2005-04-19 12:33 ` [RFC] " Daniel Jacobowitz
2005-04-19 14:56 ` Manoj Iyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.58.0504181810220.29047@lazy \
--to=manjo@austin.ibm.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox