This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: [PATCH] Don't use undefined macros


Jakub Jelinek wrote:
On Thu, Jan 29, 2009 at 03:14:17PM +0000, Andrew Stubbs wrote:
It's possible to have neither FUTEX_CLOCK_REALTIME nor __ASSUME_FUTEX_CLOCK_REALTIME defined. In this case nptl/init.c fails to compile.

How is it possible? Every nptl target is supposed to define it in lowlevellock.h. If you are using some targets for which lowlevellock.h hasn't been updated, you should update it rather than doing workarounds in a wrong place.

OK, well it isn't defined in nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h or in nptl/sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h


This was not a problem until this patch was applied:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/nptl/init.c.diff?r1=1.74&r2=1.75&cvsroot=glibc&f=h

I notice a similar fix in a recent patch from Joseph here:
http://sourceware.org/ml/libc-ports/2009-01/msg00007.html

So here's a patch to do the same on SH.

Andrew
2009-02-02  Andrew Stubbs  <ams@codesourcery.com>

	* nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
	(FUTEX_CLOCK_REALTIME): Define.

---
 src/glibc-mainline/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h |    1 +
 1 files changed, 1 insertion(+)

Index: src/glibc-mainline/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
===================================================================
--- src/glibc-mainline/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h.orig
+++ src/glibc-mainline/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
@@ -37,6 +37,7 @@
 #define FUTEX_WAIT_BITSET	9
 #define FUTEX_WAKE_BITSET	10
 #define FUTEX_PRIVATE_FLAG	128
+#define FUTEX_CLOCK_REALTIME	256
 
 #define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE	((4 << 24) | 1)
 

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