This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Reproducing glibc testsuite failures on hppa-linux.


Jeff,

Thanks for trying to reproduce the set of glibc failures I am seeing
on hppa-linux. Attached are two patches which represent the entire set
of local hacks I have applied to glibc and ports.

I've CC'd libc-ports for posterity. Perhaps someone will have pity and
tell me why I need the as-needed changes in the nptl makefiles (I have
yet to deduce if this is gcc or glibc's fault).

Cheers,
Carlos.
Index: bits/atomic.h
===================================================================
RCS file: /cvs/glibc/libc/bits/atomic.h,v
retrieving revision 1.2
diff -u -p -r1.2 atomic.h
--- bits/atomic.h	22 Mar 2003 23:00:14 -0000	1.2
+++ bits/atomic.h	18 May 2007 02:06:11 -0000
@@ -23,6 +23,7 @@
 /* We have by default no support for atomic operations.  So define
    them non-atomic.  If this is a problem somebody will have to come
    up with real definitions.  */
+#error Architecture support for atomic operations required.
 
 /* The only basic operation needed is compare and exchange.  */
 #define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
Index: elf/elf.h
===================================================================
RCS file: /cvs/glibc/libc/elf/elf.h,v
retrieving revision 1.157
diff -u -p -r1.157 elf.h
--- elf/elf.h	22 Apr 2007 10:36:16 -0000	1.157
+++ elf/elf.h	18 May 2007 02:06:11 -0000
@@ -1710,6 +1710,8 @@ typedef Elf32_Addr Elf32_Conflict;
 #define R_PARISC_LTOFF_FPTR14R	62	/* LT-rel. fct ptr, right 14 bits. */
 #define R_PARISC_FPTR64		64	/* 64 bits function address.  */
 #define R_PARISC_PLABEL32	65	/* 32 bits function address.  */
+#define R_PARISC_PLABEL21L	66	/* Left 21 bits of fdesc address */
+#define R_PARISC_PLABEL14R	70	/* Right 14 bits of fdesc address */
 #define R_PARISC_PCREL64	72	/* 64 bits PC-rel. address.  */
 #define R_PARISC_PCREL22F	74	/* 22 bits PC-rel. address.  */
 #define R_PARISC_PCREL14WR	75	/* PC-rel. address, right 14 bits.  */
@@ -1770,6 +1772,29 @@ typedef Elf32_Addr Elf32_Conflict;
 #define R_PARISC_LTOFF_TP16F	229	/* 16 bits LT-TP-rel. address.  */
 #define R_PARISC_LTOFF_TP16WF	230	/* 16 bits LT-TP-rel. address.  */
 #define R_PARISC_LTOFF_TP16DF	231	/* 16 bits LT-TP-rel. address.  */
+
+#define R_PARISC_GNU_VTENTRY    232
+#define R_PARISC_GNU_VTINHERIT  233
+#define R_PARISC_TLS_GD21L      234	/* GD 21-bit left */
+#define R_PARISC_TLS_GD14R      235	/* GD 14-bit right */
+#define R_PARISC_TLS_GDCALL     236	/* GD call to __t_g_a */
+#define R_PARISC_TLS_LDM21L     237	/* LD module 21-bit left */
+#define R_PARISC_TLS_LDM14R     238	/* LD module 14-bit right */
+#define R_PARISC_TLS_LDMCALL    239	/* LD module call to __t_g_a */
+#define R_PARISC_TLS_LDO21L     240	/* LD offset 21-bit left */
+#define R_PARISC_TLS_LDO14R     241	/* LD offset 14-bit right */
+#define R_PARISC_TLS_DTPMOD32   242	/* DTP module 32-bit */
+#define R_PARISC_TLS_DTPMOD64   243	/* DTP module 64-bit */
+#define R_PARISC_TLS_DTPOFF32   244	/* DTP offset 32-bit */
+#define R_PARISC_TLS_DTPOFF64   245	/* DTP offset 32-bit */
+
+#define R_PARISC_TLS_LE21L      R_PARISC_TPREL21L
+#define R_PARISC_TLS_LE14R      R_PARISC_TPREL14R
+#define R_PARISC_TLS_IE21L      R_PARISC_LTOFF_TP21L
+#define R_PARISC_TLS_IE14R      R_PARISC_LTOFF_TP14R
+#define R_PARISC_TLS_TPREL32    R_PARISC_TPREL32
+#define R_PARISC_TLS_TPREL64    R_PARISC_TPREL64
+
 #define R_PARISC_HIRESERVE	255
 
 /* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr.  */
Index: elf/rtld.c
===================================================================
RCS file: /cvs/glibc/libc/elf/rtld.c,v
retrieving revision 1.370
diff -u -p -r1.370 rtld.c
--- elf/rtld.c	12 Feb 2007 15:17:21 -0000	1.370
+++ elf/rtld.c	18 May 2007 02:06:12 -0000
@@ -379,14 +379,14 @@ _dl_start (void *arg)
      know it is available.  We do not have to clear the memory if we
      do not have to use the temporary bootstrap_map.  Global variables
      are initialized to zero by default.  */
-#ifndef DONT_USE_BOOTSTRAP_MAP
+#if !defined DONT_USE_BOOTSTRAP_MAP
 # ifdef HAVE_BUILTIN_MEMSET
   __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info));
 # else
-  for (size_t cnt = 0;
-       cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]);
-       ++cnt)
-    bootstrap_map.l_info[cnt] = 0;
+  /* Clear the whole bootstrap_map structure */
+  for (char *cnt = (char *)&(bootstrap_map);
+       cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map));
+       *cnt++ = '\0');
 # endif
 # if USE___THREAD
   bootstrap_map.l_tls_modid = 0;
Index: include/atomic.h
===================================================================
RCS file: /cvs/glibc/libc/include/atomic.h,v
retrieving revision 1.21
diff -u -p -r1.21 atomic.h
--- include/atomic.h	21 Dec 2006 21:44:00 -0000	1.21
+++ include/atomic.h	18 May 2007 02:06:12 -0000
@@ -174,7 +174,7 @@
      __typeof (*(mem)) __atg5_value = (newvalue);			      \
 									      \
      do									      \
-       __atg5_oldval = *__atg5_memp;					      \
+       __atg5_oldval = *(volatile __typeof (mem))__atg5_memp;		      \
      while (__builtin_expect						      \
 	    (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \
 						   __atg5_oldval), 0));	      \
@@ -195,7 +195,7 @@
      __typeof (*(mem)) __atg6_value = (value);				      \
 									      \
      do									      \
-       __atg6_oldval = *__atg6_memp;					      \
+       __atg6_oldval = *(volatile __typeof (mem))__atg6_memp;		      \
      while (__builtin_expect						      \
 	    (atomic_compare_and_exchange_bool_acq (__atg6_memp,		      \
 						   __atg6_oldval	      \
@@ -213,7 +213,7 @@
      __typeof (*(mem)) __atg7_value = (value);				      \
 									      \
      do									      \
-       __atg7_oldv = *__atg7_memp;					      \
+       __atg7_oldv = *(volatile __typeof (mem))__atg7_memp;		      \
      while (__builtin_expect						      \
 	    (catomic_compare_and_exchange_bool_acq (__atg7_memp,	      \
 						    __atg7_oldv		      \
@@ -231,7 +231,7 @@
     __typeof (mem) __atg8_memp = (mem);					      \
     __typeof (*(mem)) __atg8_value = (value);				      \
     do {								      \
-      __atg8_oldval = *__atg8_memp;					      \
+      __atg8_oldval = *(volatile __typeof (mem))__atg8_memp;		      \
       if (__atg8_oldval >= __atg8_value)				      \
 	break;								      \
     } while (__builtin_expect						      \
@@ -248,7 +248,7 @@
     __typeof (mem) __atg9_memp = (mem);					      \
     __typeof (*(mem)) __atg9_value = (value);				      \
     do {								      \
-      __atg9_oldv = *__atg9_memp;					      \
+      __atg9_oldv = *(volatile __typeof (mem))__atg9_memp;		      \
       if (__atg9_oldv >= __atg9_value)					      \
 	break;								      \
     } while (__builtin_expect						      \
@@ -266,7 +266,7 @@
     __typeof (mem) __atg10_memp = (mem);				      \
     __typeof (*(mem)) __atg10_value = (value);				      \
     do {								      \
-      __atg10_oldval = *__atg10_memp;					      \
+      __atg10_oldval = *(volatile __typeof (mem))__atg10_memp;		      \
       if (__atg10_oldval <= __atg10_value)				      \
 	break;								      \
     } while (__builtin_expect						      \
@@ -350,7 +350,7 @@
 									      \
      do									      \
        {								      \
-	 __atg11_oldval = *__atg11_memp;				      \
+	 __atg11_oldval = *(volatile __typeof (mem))__atg11_memp;	      \
 	 if (__builtin_expect (__atg11_oldval <= 0, 0))			      \
 	   break;							      \
        }								      \
@@ -389,7 +389,7 @@
      __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit));	      \
 									      \
      do									      \
-       __atg14_old = (*__atg14_memp);					      \
+       __atg14_old = (*(volatile __typeof (mem))__atg14_memp);		      \
      while (__builtin_expect						      \
 	    (atomic_compare_and_exchange_bool_acq (__atg14_memp,	      \
 						   __atg14_old | __atg14_mask,\
@@ -407,7 +407,7 @@
     __typeof (*(mem)) __atg15_mask = (mask);				      \
 									      \
     do									      \
-      __atg15_old = (*__atg15_memp);					      \
+      __atg15_old = (*(volatile __typeof (mem))__atg15_memp);		      \
     while (__builtin_expect						      \
 	   (atomic_compare_and_exchange_bool_acq (__atg15_memp,		      \
 						  __atg15_old & __atg15_mask, \
@@ -423,7 +423,7 @@
      __typeof (*(mem)) __atg16_mask = (mask);				      \
 									      \
      do									      \
-       __atg16_old = (*__atg16_memp);					      \
+       __atg16_old = (*(volatile __typeof (mem))__atg16_memp);		      \
      while (__builtin_expect						      \
 	    (atomic_compare_and_exchange_bool_acq (__atg16_memp,	      \
 						   __atg16_old & __atg16_mask,\
@@ -441,7 +441,7 @@
     __typeof (*(mem)) __atg17_mask = (mask);				      \
 									      \
     do									      \
-      __atg17_old = (*__atg17_memp);					      \
+      __atg17_old = (*(volatile __typeof (mem))__atg17_memp);		      \
     while (__builtin_expect						      \
 	   (atomic_compare_and_exchange_bool_acq (__atg17_memp,		      \
 						  __atg17_old | __atg17_mask, \
@@ -457,7 +457,7 @@
     __typeof (*(mem)) __atg18_mask = (mask);				      \
 									      \
     do									      \
-      __atg18_old = (*__atg18_memp);					      \
+      __atg18_old = (*(volatile __typeof (mem))__atg18_memp);		      \
     while (__builtin_expect						      \
 	   (catomic_compare_and_exchange_bool_acq (__atg18_memp,	      \
 						   __atg18_old | __atg18_mask,\
@@ -473,7 +473,7 @@
      __typeof (*(mem)) __atg19_mask = (mask);				      \
 									      \
      do									      \
-       __atg19_old = (*__atg19_memp);					      \
+       __atg19_old = (*(volatile __typeof (mem))__atg19_memp);		      \
      while (__builtin_expect						      \
 	    (atomic_compare_and_exchange_bool_acq (__atg19_memp,	      \
 						   __atg19_old | __atg19_mask,\
Index: math/Makefile
===================================================================
RCS file: /cvs/glibc/libc/math/Makefile,v
retrieving revision 1.129
diff -u -p -r1.129 Makefile
--- math/Makefile	28 Feb 2006 07:05:45 -0000	1.129
+++ math/Makefile	18 May 2007 02:06:12 -0000
@@ -91,13 +91,18 @@ distribute += $(filter-out $(generated),
 tests = test-matherr test-fenv atest-exp atest-sincos atest-exp2 basic-test \
 	test-misc test-fpucw tst-definitions test-tgmath test-tgmath-ret \
 	bug-nextafter bug-nexttoward bug-tgmath1 test-tgmath-int
-# We do the `long double' tests only if this data type is available and
-# distinct from `double'.
+
+# We do the `long double' tests only if this data type is available.
 test-longdouble-yes = test-ldouble test-ildoubl
 distribute += $(test-longdouble-yes:=.c)
 
+ifeq ($(long-double-fcts),yes)
+# If we have distinct types then enable testing.
+test-long-double-fcts = yes
+endif
+
 ifneq (no,$(PERL))
-libm-tests = test-float test-double $(test-longdouble-$(long-double-fcts)) \
+libm-tests = test-float test-double $(test-longdouble-$(test-long-double-fcts)) \
 	test-ifloat test-idouble
 libm-tests.o = $(addsuffix .o,$(libm-tests))
 
@@ -170,11 +175,15 @@ math-CPPFLAGS += -D__NO_MATH_INLINES -D_
 ifneq ($(long-double-fcts),yes)
 # The `double' and `long double' types are the same on this machine.
 # We won't compile the `long double' code at all.  Tell the `double' code
-# to define aliases for the `FUNCl' names.  To avoid type conflicts in
-# defining those aliases, tell <math.h> to declare the `FUNCl' names with
-# `double' instead of `long double'.
+# to define aliases for the `FUNCl' names.  
+ifeq ($(header-long-double-fcts),yes)
+math-CPPFLAGS += -DNO_LONG_DOUBLE
+else
+# To avoid type conflicts in  defining those aliases, tell <math.h> to 
+# declare the `FUNCl' names with `double' instead of `long double'.
 math-CPPFLAGS += -DNO_LONG_DOUBLE -D_Mlong_double_=double
 endif
+endif
 
 # The fdlibm code generates a lot of these warnings but is otherwise clean.
 override CFLAGS += -Wno-uninitialized
Index: nptl/Makefile
===================================================================
RCS file: /cvs/glibc/libc/nptl/Makefile,v
retrieving revision 1.189
diff -u -p -r1.189 Makefile
--- nptl/Makefile	18 May 2007 00:52:02 -0000	1.189
+++ nptl/Makefile	18 May 2007 02:06:12 -0000
@@ -263,9 +263,9 @@ xtests = tst-setuid1 tst-setuid1-static 
 # Files which must not be linked with libpthread.
 tests-nolibpthread = tst-unload
 
-# This sets the stack resource limit to 1023kb, which is not a multiple
-# of the page size since every architecture's page size is > 1k.
-tst-oddstacklimit-ENV = ; ulimit -s 1023;
+# This sets the stack resource limit to 8193kb, which is not a multiple
+# of the page size since every architecture's page size is 4096 bytes.
+tst-oddstacklimit-ENV = ; ulimit -s 8193;
 
 distribute = eintr.c tst-cleanup4aux.c
 
@@ -424,6 +424,35 @@ CFLAGS-tst-cleanupx3.c += -fexceptions
 CFLAGS-tst-cleanupx4.c += -fexceptions
 CFLAGS-tst-oncex3.c += -fexceptions
 CFLAGS-tst-oncex4.c += -fexceptions
+
+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed
+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s)
+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s)
+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s)
+
 CFLAGS-tst-align.c += $(stack-align-test-flags)
 CFLAGS-tst-align3.c += $(stack-align-test-flags)
 CFLAGS-tst-initializers1.c = -W -Wall -Werror
Index: nptl/pthread_barrier_wait.c
===================================================================
RCS file: /cvs/glibc/libc/nptl/pthread_barrier_wait.c,v
retrieving revision 1.1
diff -u -p -r1.1 pthread_barrier_wait.c
--- nptl/pthread_barrier_wait.c	28 Oct 2006 05:06:42 -0000	1.1
+++ nptl/pthread_barrier_wait.c	18 May 2007 02:06:12 -0000
@@ -62,7 +62,7 @@ pthread_barrier_wait (barrier)
       /* Wait for the event counter of the barrier to change.  */
       do
 	lll_futex_wait (&ibarrier->curr_event, event);
-      while (event == ibarrier->curr_event);
+      while (event == *(volatile unsigned int *)&ibarrier->curr_event);
     }
 
   /* Make sure the init_count is stored locally or in a register.  */
Index: nptl/sysdeps/pthread/Makefile
===================================================================
RCS file: /cvs/glibc/libc/nptl/sysdeps/pthread/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- nptl/sysdeps/pthread/Makefile	28 Feb 2006 07:09:41 -0000	1.8
+++ nptl/sysdeps/pthread/Makefile	18 May 2007 02:06:12 -0000
@@ -41,7 +41,9 @@ endif
 
 ifeq ($(have-forced-unwind),yes)
 tests += tst-mqueue8x
+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed
 CFLAGS-tst-mqueue8x.c += -fexceptions
+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) 
 endif
 endif
 
Index: stdio-common/Makefile
===================================================================
RCS file: /cvs/glibc/libc/stdio-common/Makefile,v
retrieving revision 1.100
diff -u -p -r1.100 Makefile
--- stdio-common/Makefile	18 Feb 2007 08:25:39 -0000	1.100
+++ stdio-common/Makefile	18 May 2007 02:06:12 -0000
@@ -76,7 +76,7 @@ $(objpfx)tst-printf.out: $(objpfx)tst-pr
 	$(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)'
 endif
 
-CFLAGS-vfprintf.c = -Wno-uninitialized
+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch
 CFLAGS-tst-printf.c = -Wno-format
 CFLAGS-tstdiomisc.c = -Wno-format
 CFLAGS-scanf4.c = -Wno-format
Index: sunrpc/clnt_udp.c
===================================================================
RCS file: /cvs/glibc/libc/sunrpc/clnt_udp.c,v
retrieving revision 1.33
diff -u -p -r1.33 clnt_udp.c
--- sunrpc/clnt_udp.c	20 Dec 2005 22:38:40 -0000	1.33
+++ sunrpc/clnt_udp.c	18 May 2007 02:06:12 -0000
@@ -419,7 +419,7 @@ send_again:
       while (inlen < 0 && errno == EINTR);
       if (inlen < 0)
 	{
-	  if (errno == EWOULDBLOCK)
+	  if (errno == EWOULDBLOCK || errno == EAGAIN)
 	    continue;
 	  cu->cu_error.re_errno = errno;
 	  return (cu->cu_error.re_status = RPC_CANTRECV);
Index: sysdeps/generic/dl-lookupcfg.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/dl-lookupcfg.h,v
retrieving revision 1.6
diff -u -p -r1.6 dl-lookupcfg.h
--- sysdeps/generic/dl-lookupcfg.h	7 Feb 2005 22:48:54 -0000	1.6
+++ sysdeps/generic/dl-lookupcfg.h	18 May 2007 02:06:12 -0000
@@ -27,3 +27,5 @@
 #define DL_FIXUP_VALUE_CODE_ADDR(value) (value)
 #define DL_FIXUP_VALUE_ADDR(value) (value)
 #define DL_FIXUP_ADDR_VALUE(addr) (addr)
+
+#error hppa-linux needs lookup function support.
Index: sysdeps/generic/framestate.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/framestate.c,v
retrieving revision 1.4
diff -u -p -r1.4 framestate.c
--- sysdeps/generic/framestate.c	21 Feb 2004 09:07:05 -0000	1.4
+++ sysdeps/generic/framestate.c	18 May 2007 02:06:12 -0000
@@ -25,6 +25,10 @@
 #include <unwind-dw2.c>
 #undef __frame_state_for
 
+#ifndef LIBGCC_S_SO
+#define LIBGCC_S_SO "libgcc_s.so.1"
+#endif
+
 typedef struct frame_state * (*framesf)(void *pc, struct frame_state *);
 struct frame_state *__frame_state_for (void *pc,
 				       struct frame_state *frame_state);
@@ -36,7 +40,7 @@ __frame_state_for (void *pc, struct fram
 
   if (frame_state_for == NULL)
     {
-      void *handle = __libc_dlopen ("libgcc_s.so.1");
+      void *handle = __libc_dlopen (LIBGCC_S_SO);
 
       if (handle == NULL
 	  || (frame_state_for
Index: sysdeps/unix/sysv/linux/getcwd.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/getcwd.c,v
retrieving revision 1.24
diff -u -p -r1.24 getcwd.c
--- sysdeps/unix/sysv/linux/getcwd.c	2 Apr 2006 17:58:28 -0000	1.24
+++ sysdeps/unix/sysv/linux/getcwd.c	18 May 2007 02:06:13 -0000
@@ -31,6 +31,9 @@
 
 #include <kernel-features.h>
 
+#ifndef MAX
+# define MAX(a, b) ((a) < (b) ? (b) : (a))
+#endif
 
 /* If we compile the file for use in ld.so we don't need the feature
    that getcwd() allocates the buffers itself.  */
Index: sysdeps/unix/sysv/linux/posix_fadvise.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/posix_fadvise.c,v
retrieving revision 1.3
diff -u -p -r1.3 posix_fadvise.c
--- sysdeps/unix/sysv/linux/posix_fadvise.c	17 Aug 2003 00:36:22 -0000	1.3
+++ sysdeps/unix/sysv/linux/posix_fadvise.c	18 May 2007 02:06:13 -0000
@@ -35,6 +35,19 @@ posix_fadvise (int fd, off_t offset, off
     return INTERNAL_SYSCALL_ERRNO (ret, err);
   return 0;
 #else
+# ifdef __NR_fadvise64_64
+  INTERNAL_SYSCALL_DECL (err);  
+  int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
+			      __LONG_LONG_PAIR ((long) (offset >> 31),
+						(long) offset),
+			      __LONG_LONG_PAIR ((long) (len >> 31),
+						(long) len),
+			      advise);
+  if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+    return INTERNAL_SYSCALL_ERRNO (ret, err);
+  return 0;
+# else
   return ENOSYS;
+# endif
 #endif
 }
Index: sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h,v
retrieving revision 1.2
diff -u -p -r1.2 pthreadtypes.h
--- sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h	25 Jul 2006 01:58:10 -0000	1.2
+++ sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h	18 May 2007 02:06:37 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,13 +19,14 @@
 #ifndef _BITS_PTHREADTYPES_H
 #define _BITS_PTHREADTYPES_H	1
 
-/* Linuxthread type sizes:
+/* Linuxthread type sizes (bytes):
    sizeof(pthread_attr_t) = 0x24 (36)
    sizeof(pthread_mutex_t) = 0x30 (48)
    sizeof(pthread_mutexattr_t) = 0x4 (4)
    sizeof(pthread_cond_t) = 0x30 (48)
-   	= Grew to 64 bytes in NPTL.
-   No pthread_cond_compat_t ...
+	= Expanded to 64 bytes in NPTL. 
+   sizeof(pthread_cond_compat_t) = 0xc (12)
+	= Did not exist in Linuxthreads.
    sizeof(pthread_condattr_t) = 0x4 (4)
    sizeof(pthread_rwlock_t) = 0x40 (64)
    sizeof(pthread_rwlockattr_t) = 0x8 (8)
@@ -52,9 +53,9 @@ typedef unsigned long int pthread_t;
    implementation. For NPTL we use LWS Compare and 
    Exchange to implement primitives. */
 #if 0
-typedef struct {
+typedef volatile struct {
 	int lock[4];
-} __atomic_lock_t;
+} __attribute__ ((aligned(16))) __atomic_lock_t;
 #endif
 
 typedef union

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]