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

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

[PATCH] Re: glibc build fails on x86_64


On Wed, Sep 03, 2003 at 01:07:13PM +0200, Andreas Jaeger wrote:
> >> I just got on x86_64:
> >> loadmsgcat.c: In function `_nl_load_domain':
> >> loadmsgcat.c:917: error: `__NR_open_not_cancel_2' undeclared (first use in this function)
> >> loadmsgcat.c:917: error: (Each undeclared identifier is reported only once
> >> loadmsgcat.c:917: error: for each function it appears in.)
> >> loadmsgcat.c:965: error: `__NR_read_not_cancel' undeclared (first use in this function)
> >
> > linuxthreads or NPTL?
> > Both built just fine for me last night on x86_64.
> 
> linuxthreads - with current CVS after Uli's changes were in,

Oh, apparently this was one of the 2 2003-09-02 changes I didn't have in my
tree during that build.

Try following untested patch. The problem is that non-NPTL linux
not-cancel.h uses INLINE_SYSCALL macros, so when open is redefined to
open_not_cancel_2 and open_not_cancel_2 is defined as INLINE_SYSCALL (open,
...) it will expand as __NR_open_not_cancel_2.

2003-09-03  Jakub Jelinek  <jakub@redhat.com>

	* intl/loadmsgcat.c (open, close, read, mmap, munmap): Define as
	function-like macros.

--- libc/intl/loadmsgcat.c.jj	2003-09-03 07:10:34.000000000 -0400
+++ libc/intl/loadmsgcat.c	2003-09-03 07:22:48.000000000 -0400
@@ -454,11 +454,12 @@ char *alloca ();
 /* Rename the non ISO C functions.  This is required by the standard
    because some ISO C functions will require linking with this object
    file and the name space must not be polluted.  */
-# define open   open_not_cancel_2
-# define close  close_not_cancel_no_status
-# define read   read_not_cancel
-# define mmap   __mmap
-# define munmap __munmap
+# define open(name, flags)	open_not_cancel_2 (name, flags)
+# define close(fd)		close_not_cancel_no_status (fd)
+# define read(fd, buf, n)	read_not_cancel (fd, buf, n)
+# define mmap(addr, len, prot, flags, fd, offset) \
+  __mmap (addr, len, prot, flags, fd, offset)
+# define munmap(addr, len)	__munmap (addr, len)
 #endif
 
 /* For those losing systems which don't have `alloca' we have to add


	Jakub


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