This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
20000117 portability patches
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: 20000117 portability patches
- From: Rodney Brown <rdb at localhost>
- Date: Wed, 26 Jan 2000 15:32:23 +1100 (EST)
- Reply-To: RDBrown at mira dot net, RodneyBrown at pmsc dot com
On i586-sco-sysv5uw7.1.0 the snapshot fails to build because of conflicting
structure definitions in the system header files.
=> a candidate for an autoconf test on compatibility?
In file included from /usr/include/lwpsynch.h:19,
from /usr/include/synch.h:21,
from ../../gdb-20000117/gdb/uw-thread.c:113:
/usr/include/machlock.h:15: warning: redefinition of `_simplelock_t'
/usr/include/sys/types.h:629: warning: `_simplelock_t' previously declared here
In file included from /usr/include/synch.h:21,
from ../../gdb-20000117/gdb/uw-thread.c:113:
/usr/include/lwpsynch.h:35: conflicting types for `lwp_cond_t'
/usr/include/sys/types.h:665: previous declaration of `lwp_cond_t'
In file included from ../../gdb-20000117/gdb/uw-thread.c:113:
/usr/include/synch.h:47: conflicting types for `thrq_elt_t'
/usr/include/sys/types.h:622: previous declaration of `thrq_elt_t'
/usr/include/synch.h:63: conflicting types for `mutex_t'
/usr/include/sys/types.h:642: previous declaration of `mutex_t'
/usr/include/synch.h:73: conflicting types for `cond_t'
/usr/include/sys/types.h:672: previous declaration of `cond_t'
/usr/include/synch.h:84: conflicting types for `sema_t'
/usr/include/sys/types.h:680: previous declaration of `sema_t'
/usr/include/synch.h:102: conflicting types for `rwcv_t'
/usr/include/sys/types.h:687: previous declaration of `rwcv_t'
/usr/include/synch.h:148: conflicting types for `rmutex_t'
/usr/include/sys/types.h:653: previous declaration of `rmutex_t'
Suggested change for hppa2.0-hp-hpux10.20 to reduce the 567 warnings
in bfd/som.c initializing som_hppa_howto_table starting at line 787
#define SOM_HOWTO(TYPE, NAME) \
HOWTO(TYPE, 0, 0, 32, false, 0, 0, hppa_som_reloc, NAME, false, 0, 0, false)
Change from
{R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
{R_NO_RELOCATION, 0, 0, 32, false, 0, 0, hppa_som_reloc, "R_NO_RELOCATION"},
...
To
SOM_HOWTO(R_NO_RELOCATION, "R_NO_RELOCATION"),
SOM_HOWTO(R_NO_RELOCATION, "R_NO_RELOCATION"),
...
to get rid of missing initializer warnings
In bfd/som.c initializing som_fixup_formats at 387, there are warnings
about the fixup_formats not being braced together.
Shouldn't the format element be 'const char * const format'
rather than 'char *format' for full ANSI?
(would make above changes if I was Copyright assigned).
Changes required for alpha-dec-osf4.0e
Note that the PIDGET #ifndef is also provided in gdb/defs.h - should
it be removed altogether from procfs.c?
The include/ansidecl.h patch is to correct a prototype mismatch where
a function prototype is declared with a void * parameter and with a PTR
argument in the K&R actual function declaration. (overwrote the
build.log, will look at the current snapshot).
Suggested ChangeLog entry
2000-01-26 Rodney Brown <RodneyBrown@pmsc.com>
* procfs.c: define MERGEPID if not defined for osf4.0e
* include/ansidecl.h __DECC => ANSI capable compiler
--- gdb/procfs.c.orig Sat Jan 8 07:28:50 2000
+++ gdb/procfs.c Fri Jan 21 13:26:04 2000
@@ -287,6 +287,8 @@
#ifndef PIDGET
#define PIDGET(PID) (PID)
#define TIDGET(PID) (PID)
+#endif
+#ifndef MERGEPID
#define MERGEPID(PID, TID) (PID)
#endif
--- include/ansidecl.h.orig Sat Dec 25 04:26:54 1999
+++ include/ansidecl.h Sat Jan 22 16:19:55 2000
@@ -94,7 +94,7 @@
/* LINTLIBRARY */
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
+#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) || defined(__DECC)
/* All known AIX compilers implement these things (but don't always
define __STDC__). The RISC/OS MIPS compiler defines these things
in SVR4 mode, but does not define __STDC__. */