[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] standards.texi error function

From: Paul Eggert
Subject: Re: [bug-gnulib] standards.texi error function
Date: Mon, 13 Dec 2004 13:37:06 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     Normally the user simply compiles the files in question, and adds one
>     line to configure.in.
> Which are "the files in question"?

The following files, all taken from gnulib:


> What is that line added to configure.in?

The gl_ERROR line invokes the macro of that name defined in
m4/error.m4.  This macro arranges for one's Makefile to compile or not
compile error.c (it's not necessary on GNU systems).  It also arranges
for config.h to contain definitions of preprocessor symbols like
STRERROR_R_CHAR_P that are useful for compiling error.c on systems
that don't have the error function in libc.

For the coding standards, I wouldn't suggest this much detail.  I'd
just point people to gnulib's error module.

I was thinking of modifying error.h and error.c so that the *.m4 files
aren't strictly necessary; if you omit them, you can simply use
error.h and error.c as-is.  This would be simpler to integrate, though
it would have some downsides as well: your application would always
use your copy of the error module, rather than libc's version (if
available), and your copy wouldn't be reentrant since it would use
strerror rather than strerror_r.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]