Bug#34690: glibc2.1 header bug
>>>>> Ossama Othman writes:
> Package: libc6-dev
> Version: 2.1.1-0pre1.3
> Hi,
> Yet another glibc2.1 problem/bug. :)
> The macro "NGREG" (the number of general registers) is defined in both
> `/usr/include/sys/ucontext.h' and `/usr/include/sys/elf.h'. Also, a
> bunch of related "greg" typedefs are also defined in both headers.
> Including both of these headers causes "previously defined here"
> compile time errors. For example, I #included <sys/ucontext.h> and
> <sys/procfs.h> (which #includes <sys/elf.h>) in the same source file
> and got several "previously defined" errors for the NGREG macro.
> I tend to think that the NGREG in <sys/elf.h> is the more "correct"
> #define since it actually uses sizeof on the general register
> structure rather than some "magic" number, 19 in this case. I'd
> suggest placing "#ifndef NGREG" guards around each of #define NGREG
> declarations. Contacting the upstream authors is also in order. I'm
> not sure about the typedefs.
This has been changed upstream now. The patches will be in glibc
2.1.1 final.
Andreas
1999-05-02 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/sys/procfs.h: Remove greg_t, gregset_t,
and fpregset_t definition. They are defined in ucontext.h.
Index: sysdeps/unix/sysv/linux/sys/procfs.h
===================================================================
RCS file: /glibc/cvsfiles/libc/sysdeps/unix/sysv/linux/sys/procfs.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- procfs.h 1998/12/10 09:59:30 1.7
+++ procfs.h 1999/05/02 19:00:03 1.8
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 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
@@ -39,11 +39,6 @@
int si_code; /* Extra code. */
int si_errno; /* Errno. */
};
-
-typedef elf_greg_t greg_t;
-typedef elf_gregset_t gregset_t;
-typedef elf_fpregset_t fpregset_t;
-#define NGREG ELF_NGREG
/* Definitions to generate Intel SVR4-like core files. These mostly
have the same names as the SVR4 types with "elf_" tacked on the
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de
Reply to: