public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Small patch for NetBSD
@ 1997-08-31 23:12 Jim Wilson
  0 siblings, 0 replies; 8+ messages in thread
From: Jim Wilson @ 1997-08-31 23:12 UTC (permalink / raw)
  To: egcs

The right solution here is probably to use strerror instead of sys_siglist.
Try looking at what texinfo does (the most recent one, not the one in
EGCS).

Jim

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Small patch for NetBSD
  1997-09-01  2:11 ` Richard Henderson
@ 1997-09-01 12:02   ` Jim Meyering
  0 siblings, 0 replies; 8+ messages in thread
From: Jim Meyering @ 1997-09-01 12:02 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Peter Seebach, law, egcs

Richard Henderson <rth@cygnus.com> writes:
| > strsignal()?
| >
| > While it's obvious what it's supposed to do, when did that come into play?
| > I can't find it in C89 or C9X...
|
| It is likely a GNU extension.  I find it on Linux libc5 and glibc
| only.  I have no idea when or where it was first introduced, though
| it is such an obvious thing.  We also have psignal(), fwiw.
|
| In any case, it is something to have autoconf check for at the same
| time as sys_errlist and sys_siglist, and, as I described earlier,
| we should preferentially use the functions.

It's in Solaris 5.5.1, too.
There's a strsignal.c in libiberty for those who want to use autoconf's
AC_REPLACE_FUNCS.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Small patch for NetBSD
  1997-08-31 23:12 Peter Seebach
@ 1997-09-01  2:11 ` Richard Henderson
  1997-09-01 12:02   ` Jim Meyering
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Henderson @ 1997-09-01  2:11 UTC (permalink / raw)
  To: Peter Seebach; +Cc: law, egcs

> strsignal()?
> 
> While it's obvious what it's supposed to do, when did that come into play?
> I can't find it in C89 or C9X...

It is likely a GNU extension.  I find it on Linux libc5 and glibc
only.  I have no idea when or where it was first introduced, though
it is such an obvious thing.  We also have psignal(), fwiw.

In any case, it is something to have autoconf check for at the same
time as sys_errlist and sys_siglist, and, as I described earlier,
we should preferentially use the functions.


r~

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Small patch for NetBSD
@ 1997-08-31 23:12 Richard Henderson
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 1997-08-31 23:12 UTC (permalink / raw)
  To: egcs

> Peter Seebach reminds me that sys_errlist and sys_siglist are not the same
> thing, as might be obvious from the fact that their names are different,
> so please ignore my comment here.  strerror will not help with sys_siglist.

However strsignal() will. 

It is to our advantage to use the functions when available, because on
systems that do not compile applications PIC, the size of an array is
part of the ABI between a program and its shared libraries due to the
awful hack that is .dynbss.  Programs break when new error codes are
added and the library updated.


r~

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Small patch for NetBSD
@ 1997-08-31 23:12 Jim Wilson
  0 siblings, 0 replies; 8+ messages in thread
From: Jim Wilson @ 1997-08-31 23:12 UTC (permalink / raw)
  To: egcs

	The right solution here is probably to use strerror instead of sys_siglist.

Peter Seebach reminds me that sys_errlist and sys_siglist are not the same
thing, as might be obvious from the fact that their names are different,
so please ignore my comment here.  strerror will not help with sys_siglist.

Jim

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Small patch for NetBSD
@ 1997-08-31 23:12 Peter Seebach
  1997-09-01  2:11 ` Richard Henderson
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Seebach @ 1997-08-31 23:12 UTC (permalink / raw)
  To: egcs

strsignal()?

While it's obvious what it's supposed to do, when did that come into play?
I can't find it in C89 or C9X...

It's a good idea; wish I'd thought of it, or someone had suggested it, a
few months ago.

-s

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Small patch for NetBSD
  1997-08-31 18:57 erase operation in STL Weiwen Liu
@ 1997-08-31 20:05 ` Jeffrey A Law
  0 siblings, 0 replies; 8+ messages in thread
From: Jeffrey A Law @ 1997-08-31 20:05 UTC (permalink / raw)
  To: egcs

  In message you write:
  > NetBSD declares sys_errlist--this caused the texinfo compile to break
  > since it also declares sys_errlist (for mystrerror()).  I won't bother
  > sending in a patch for that since I compiled the current texinfo with
  > no trouble recently.  However,
  > 
  > NetBSD has defined sys_siglist since version 1.0.  Here is a patch
  > that allows the 970828 collect2.c to compile when configured for
  > m68k-unknown-netbsd1.2g:
  > 
  > Sun Aug 31 11:38:55 1997  Allen Briggs (briggs@macbsd.com)
  > 
  > 	* netbsd.h: Define DONT_DECLARE_SYS_SIGLIST if >= NetBSD 1.0.
The way to go is to use autoconf to detect when SYS_SIGLIST and
friends need to be declared.  I'm actively working on a patch for
this problem.

Jeff

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Small patch for NetBSD
  1997-08-31  2:07 egcs 970828 and X11 on linux/x86 H.J. Lu
@ 1997-08-31 16:37 ` Allen Briggs
  0 siblings, 0 replies; 8+ messages in thread
From: Allen Briggs @ 1997-08-31 16:37 UTC (permalink / raw)
  To: egcs

NetBSD declares sys_errlist--this caused the texinfo compile to break
since it also declares sys_errlist (for mystrerror()).  I won't bother
sending in a patch for that since I compiled the current texinfo with
no trouble recently.  However,

NetBSD has defined sys_siglist since version 1.0.  Here is a patch
that allows the 970828 collect2.c to compile when configured for
m68k-unknown-netbsd1.2g:

Sun Aug 31 11:38:55 1997  Allen Briggs (briggs@macbsd.com)

	* netbsd.h: Define DONT_DECLARE_SYS_SIGLIST if >= NetBSD 1.0.

::::::::::::::::::::::::::::::::::::::::::::::::::

*** /tmp/netbsd.h	Sun Aug 31 11:45:24 1997
--- gcc/config/netbsd.h	Sun Aug 31 12:32:20 1997
***************
*** 34,39 ****
--- 34,40 ----
  
  #endif
  
+ #include 
  
  /* Provide a CPP_SPEC appropriate for NetBSD.  Current we just deal with
     the GCC option `-posix'.  */
***************
*** 65,70 ****
--- 66,78 ----
  #define SWITCH_TAKES_ARG(CHAR) \
    (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
     || (CHAR) == 'R')
+ 
+ /* NetBSD 1.0 and later have sys_siglist in signal.h, but current
+    numbering drops the last digit (i.e., numbering is now YYYYMM). */
+ 
+ #if (NetBSD > 1993070 || NetBSD 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1997-09-01 12:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-31 23:12 Small patch for NetBSD Jim Wilson
  -- strict thread matches above, loose matches on Subject: below --
1997-08-31 23:12 Richard Henderson
1997-08-31 23:12 Peter Seebach
1997-09-01  2:11 ` Richard Henderson
1997-09-01 12:02   ` Jim Meyering
1997-08-31 23:12 Jim Wilson
1997-08-31 18:57 erase operation in STL Weiwen Liu
1997-08-31 20:05 ` Small patch for NetBSD Jeffrey A Law
1997-08-31  2:07 egcs 970828 and X11 on linux/x86 H.J. Lu
1997-08-31 16:37 ` Small patch for NetBSD Allen Briggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).