Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Feb 1996 10:19:15 PST
From:      "Marty Leisner" <leisner@sdsp.mc.xerox.com>
To:        Jerry Kendall <jerry@border.com>
Cc:        "Amancio Hasty Jr." <hasty@rah.star-gate.com>, Andreas Klemm <andreas@knobel.gun.de>, ports@freebsd.org, hackers@freebsd.org
Subject:   Re: Pentium gcc port done 
Message-ID:  <9602011819.AA09036@gnu.mc.xerox.com>
In-Reply-To: Your message of "Wed, 31 Jan 1996 06:11:37 PST." <96Jan31.091819est.20485@janus.border.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

Instead of doing system ifdefs, I this is how LPRng does it...

 if defined(HAVE_SYS_NERR)
#  if !defined(HAVE_SYS_NERR_DEF)
     extern int sys_nerr;
#  endif
#  define num_errors    (sys_nerr)
# else
#  define num_errors    (-1)            /* always use "errno=%d" */
# endif

# if defined(HAVE_SYS_ERRLIST)
#  if !defined(HAVE_SYS_ERRLIST_DEF)
     extern const char *const sys_errlist[];
#  endif
# else
#  undef  num_errors
#  define num_errors   (-1)            /* always use "errno=%d" */
# endif

#endif

the definitions are created by configure scripts.

> >  > *** gcc-2.7.2/cccp.c.orig	Tue Jan 30 22:44:20 1996
> >  > --- gcc-2.7.2/cccp.c	Tue Jan 30 22:44:40 1996
> >  > ***************
> >  > *** 316,322 ****
> >  >   #ifndef VMS
> >  >   #ifndef HAVE_STRERROR
> >  >   extern int sys_nerr;
> >  > ! #if defined(bsd4_4)
> >  >   extern const char *const sys_errlist[];
> >  >   #else
> >  >   extern char *sys_errlist[];

-- 
marty
leisner@sdsp.mc.xerox.com  
Member of the League for Programming Freedom





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9602011819.AA09036>