This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR libgomp/36469
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andreas Tobler <andreast-list at fgznet dot ch>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 Jun 2008 07:50:29 -0400
- Subject: [PATCH] Fix PR libgomp/36469
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
Does the following patch cure HPUX bootstrap?
Using strtoul there is not a big deal, config/posix/ doesn't do busy waiting
anyway.
2008-06-10 Jakub Jelinek <jakub@redhat.com>
PR libgomp/36469
* configure.ac: Add AC_CHECK_FUNCS (strtoull).
* configure: Regenerated.
* config.h.in: Regenerated.
* env.c (strtoull): Define to strtoul if HAVE_STRTOULL is not
defined.
--- libgomp/configure.ac.jj 2008-06-06 12:38:04.000000000 +0200
+++ libgomp/configure.ac 2008-06-10 12:50:50.000000000 +0200
@@ -178,7 +178,7 @@ AC_LINK_IFELSE(
[AC_MSG_ERROR([Pthreads are required to build libgomp])])])
# Check for functions needed.
-AC_CHECK_FUNCS(getloadavg clock_gettime)
+AC_CHECK_FUNCS(getloadavg clock_gettime strtoull)
# Check for broken semaphore implementation on darwin.
# sem_init returns: sem_init error: Function not implemented.
--- libgomp/env.c.jj 2008-06-06 12:38:06.000000000 +0200
+++ libgomp/env.c 2008-06-10 12:52:48.000000000 +0200
@@ -47,6 +47,9 @@
#include <limits.h>
#include <errno.h>
+#ifndef HAVE_STRTOULL
+# define strtoull(ptr, eptr, base) strtoul (ptr, eptr, base)
+#endif
struct gomp_task_icv gomp_global_icv = {
.nthreads_var = 1,
--- libgomp/configure.jj 2008-06-06 12:38:02.000000000 +0200
+++ libgomp/configure 2008-06-10 12:51:22.000000000 +0200
@@ -16624,7 +16624,8 @@ rm -f conftest.err conftest.$ac_objext \
# Check for functions needed.
-for ac_func in getloadavg clock_gettime
+
+for ac_func in getloadavg clock_gettime strtoull
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
--- libgomp/config.h.in.jj 2008-06-06 12:38:19.000000000 +0200
+++ libgomp/config.h.in 2008-06-10 12:51:25.000000000 +0200
@@ -48,6 +48,9 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the `strtoull' function. */
+#undef HAVE_STRTOULL
+
/* Define to 1 if the target supports __sync_*_compare_and_swap */
#undef HAVE_SYNC_BUILTINS
Jakub