Re: Status of the LPR package
At 21:12 -0800 1998-11-14, Adam J. Klein wrote:
I've looked into that, and it seems like a good idea, but there are
several problems. The source code uses functions found only in BSD libc.
Does anyone know where I might find something like a bsd-compat lib?
/usr/doc/libc6/NOTES.gz
- Macro: _BSD_SOURCE
If you define this macro, functionality derived from 4.3 BSD Unix
is included as well as the ANSI C, POSIX.1, and POSIX.2 material.
Some of the features derived from 4.3 BSD Unix conflict with the
corresponding features specified by the POSIX.1 standard. If this
macro is defined, the 4.3 BSD definitions take precedence over the
POSIX definitions.
Due to the nature of some of the conflicts between 4.3 BSD and
POSIX.1, you need to use a special "BSD compatibility library"
when linking programs compiled for BSD compatibility. This is
because some functions must be defined in two different ways, one
of them in the normal C library, and one of them in the
compatibility library. If your program defines `_BSD_SOURCE', you
must give the option `-lbsd-compat' to the compiler or linker when
linking the program, to tell it to find functions in this special
compatibility library before looking for them in the normal C
library.
[snip]
- Macro: _GNU_SOURCE
If you define this macro, everything is included: ANSI C, POSIX.1,
POSIX.2, BSD, SVID, X/Open, and GNU extensions. In the cases where
POSIX.1 conflicts with BSD, the POSIX definitions take precedence.
If you want to get the full effect of `_GNU_SOURCE' but make the
BSD definitions take precedence over the POSIX definitions, use
this sequence of definitions:
#define _GNU_SOURCE
#define _BSD_SOURCE
#define _SVID_SOURCE
Note that if you do this, you must link your program with the BSD
compatibility library by passing the `-lbsd-compat' option to the
compiler or linker. *Note:* If you forget to do this, you may get
very strange errors at run time.
--
Joel Klecker (aka Espy) <URL:http://web.espy.org/>
<URL:mailto:jk@espy.org> <URL:mailto:espy@debian.org>
Debian GNU/Linux PowerPC -- <URL:http://www.debian.org/ports/powerpc/>
Reply to: