Paul Eggert | 18 Jun 2013 23:24
Favicon

[PATCH] doc: document extern-inline

---
 ChangeLog              |  6 ++++
 doc/extern-inline.texi | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/gnulib.texi        |  3 ++
 m4/extern-inline.m4    | 14 +++-----
 4 files changed, 110 insertions(+), 9 deletions(-)
 create mode 100644 doc/extern-inline.texi

diff --git a/ChangeLog b/ChangeLog
index 0af59a5..5e4f02f 100644
--- a/ChangeLog
+++ b/ChangeLog
 <at>  <at>  -1,5 +1,11  <at>  <at> 
 2013-06-18  Paul Eggert  <eggert <at> cs.ucla.edu>

+	doc: document extern-inline
+	* doc/extern-inline.texi: New file.
+	* doc/gnulib.texi (alloca-opt): Include it.
+	* m4/extern-inline.m4: Move some comments to documentation,
+	and others closer to what they describe.
+
 	doc: chatter less
 	* doc/Makefile (NEWEST_GNULIB_TEXI_FILE): New macro.
 	(updated-stamp): Use it.  This causes 'make' to output just
diff --git a/doc/extern-inline.texi b/doc/extern-inline.texi
new file mode 100644
index 0000000..1519bc4
--- /dev/null
+++ b/doc/extern-inline.texi
 <at>  <at>  -0,0 +1,96  <at>  <at> 
(Continue reading)

Paul Eggert | 18 Jun 2013 23:19
Favicon

[PATCH] doc: chatter less

---
 ChangeLog    | 5 +++++
 doc/Makefile | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 09e36b0..0af59a5 100644
--- a/ChangeLog
+++ b/ChangeLog
 <at>  <at>  -1,5 +1,10  <at>  <at> 
 2013-06-18  Paul Eggert  <eggert <at> cs.ucla.edu>

+	doc: chatter less
+	* doc/Makefile (NEWEST_GNULIB_TEXI_FILE): New macro.
+	(updated-stamp): Use it.  This causes 'make' to output just
+	one file name rather than zillions.
+
 	fflush, fseeko: port to musl cross-compiles
 	* lib/fseeko.c (fseeko): Assume that fflushing stdin works if
 	on some implementation that (1) is not known to be buggy,
diff --git a/doc/Makefile b/doc/Makefile
index cdd9305..f64732f 100644
--- a/doc/Makefile
+++ b/doc/Makefile
 <at>  <at>  -55,10 +55,11  <at>  <at>  INSTALL.UTF-8: INSTALL
 	sed -e "s/\`\([^']*\)'/‘\1’/g" $< > $ <at> 

 GNULIB_TEXI_FILES = $(filter-out maintain.texi make-stds.texi standards.texi,$(wildcard *.texi))
$(wildcard posix-headers/*.texi) $(wildcard posix-functions/*.texi) $(wildcard
glibc-headers/*.texi) $(wildcard glibc-functions/*.texi)
(Continue reading)

Rich Felker | 18 Jun 2013 19:03

gnulib cross-compiling issue with musl

Hi again,

Last year after a great deal of discussion, we got most of the issues
between gnulib and musl libc fixed. However there's one problem that
keeps coming up again and again from our users: when cross-compiling,
gnulib treats fseeko (well, actually fflush(stdin), which in turn
requires a replacement fseeko) as broken by default (since it can't
run tests to check) and the #else case in gnulib's fseeko.c contains
#error.

Presumably it's possible to work around this issue by creating a
config.cache file that overrides gl_cv_func_fflush_stdin=yes, but that
requires a bit of manual intervention to make it work, and it would
give a much nicer user experience if things just worked out of the
box.

I have a couple proposed solutions for gnulib's fseeko.c:

1. In the #else case, instead of #error, put if(0). In other words,
   treat unknown platforms as having working fseeko that does not need
   any of the replacement code; execution would simply fall through to
   the call to the real fseeko at the end of the function.

2. Write a "portable" version of the replacement code for the #else
   case (or to replace all the existing cases) in terms of standard
   functions and other existing gnulib extended-stdio functions. I
   don't understand well enough what it's doing to judge whether this
   is feasible, but this seems to be the mechanism by which the
   replacement fflush is currently working on musl; all of the
   functions it calls in the #else cases are either standard functions
(Continue reading)

LRN | 15 Jun 2013 23:22
Picon
Gravatar

cdecl in msvc-inval.c


There are 3 occurrences of "cdecl" keyword in msvc-inval.c
That keyword is not entirely correct, it should be "__cdecl".

"cdecl" only works with MS PSDK, which has "#define cdecl _cdecl", but
not with mingw-w64.

--

-- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
Bruce Korb | 13 Jun 2013 22:40
Picon

The real patch

I copied something inexpertly.  "EXIT" needs to be added to the string array
and the offset table needs the offset to it.
Brandon Invergo | 8 Jun 2013 18:37
Picon

Building the argp module fails

This is my first try at using gnulib so I won't be surprised if it's a
user error.

Anyway, I tried importing the argp module into my project and the build
of the module itself always fails.  I've also tried it in an empty
directory with just minimal configure.ac and Makefile.am files and still
no luck. 

Here is stderr:

In file included from argp-eexst.c:25:0:
argp.h:582:1: error: unknown type name ‘_GL_INLINE_HEADER_BEGIN’
 _GL_INLINE_HEADER_BEGIN
 ^
argp.h:613:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
 ARGP_EI void
         ^
argp.h:619:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
 ARGP_EI int
         ^
argp.h:631:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
 ARGP_EI int
         ^
argp.h:642:1: error: unknown type name ‘_GL_INLINE_HEADER_END’
 _GL_INLINE_HEADER_END
 ^
argp-eexst.c:30:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘argp_err_exit_status’
 error_t argp_err_exit_status = EX_USAGE;
         ^
(Continue reading)

LRN | 6 Jun 2013 13:19
Picon
Gravatar

gl_ABSOLUTE_HEADER doesn't work for me


These two lines:
      gl_cv_absolute_stdint_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
sed -n '\#/stdint.h#{s#.*"\(.*/stdint.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'`

produce an empty string.
I assume the part of the macro that is responsible for generating this
shell code is:
      AS_VAR_SET(gl_absolute_header,
[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
sed -n
'\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;s#^/[^/]#//&#;p;q;}'`])

I'm not a sed guru, so i need help debugging this.

The output of eval "$ac_cpp conftest.$ac_ext" is attached.

--

-- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
# 1 "conftest.c" # 1 "<command-line>" # 1 "conftest.c" # 142 "conftest.c" # 1
"f:\s29\mingw\lib\gcc\i686-w64-mingw32\4.8.0\include\stdint.h" 1 3 4 # 9
"f:\s29\mingw\lib\gcc\i686-w64-mingw32\4.8.0\include\stdint.h" 3 4 # 1
"f:\s29\mingw\include\stdint.h" 1 3 4 # 28 "f:\s29\mingw\include\stdint.h" 3 4 # 1
"f:\s29\mingw\include\crtdefs.h" 1 3 4 # 10 "f:\s29\mingw\include\crtdefs.h" 3 4 # 1
"f:\s29\mingw\include\_mingw.h" 1 3 4 # 12 "f:\s29\mingw\include\_mingw.h" 3 4 # 1
"f:\s29\mingw\include\_mingw_mac.h" 1 3 4 # 13 "f:\s29\mingw\include\_mingw.h" 2 3 4 # 1
"f:\s29\mingw\include\_mingw_secapi.h" 1 3 4 # 14 "f:\s29\mingw\include\_mingw.h" 2 3 4 # 278
"f:\s29\mingw\include\_mingw.h" 3 4 # 1 "f:\s29\mingw\include\vadefs.h" 1 3 4 # 9
(Continue reading)

Colin Watson | 5 Jun 2013 11:10
Picon
Favicon
Gravatar

FreeBSD has setenv but not clearenv

Hi,

I've had multiple reports (https://savannah.nongnu.org/bugs/?36848,
https://bugs.gentoo.org/show_bug.cgi?id=244517) telling me that FreeBSD
is missing the clearenv function, even though it has setenv.  It would
be very helpful if Gnulib could handle this.  Is "environ = NULL;"
portable, or does it need something cleverer?

Thanks,

--

-- 
Colin Watson                                       [cjwatson <at> debian.org]

Albert Chin | 4 Jun 2013 03:44

Errors compiling fwriting.c on OSF/1

With latest gnulib:
  $ uname -a
  OSF1 gen V5.1 732 alpha
  $ ./gnulib-tool --test --with-tests fwriting
  ...
  source='../../gllib/freading.c' object='freading.o' libtool=no DEPDIR=.deps depmode=tru64
/bin/ksh ../../build-aux/depcomp  cc -DHAVE_CONFIG_H -I. -I../../gllib -I.. 
-DGNULIB_STRICT_CHECKING=1 -g -c ../../gllib/freading.c
  cc: Error: ../../gllib/freading.c, line 48: In this statement, "_IOREAD" is not declared. (undeclared)
    return (fp->_flag & _IOREAD) != 0;
  ----------------------^

The problem is that _OSF_SOURCE is required to expose _IOREAD. From
/usr/include/stdio.h:
  #ifdef _OSF_SOURCE
  ...
  #define _IOREAD         0001
  #define _IOWRT          0002
  #define _IOMYBUF        0010
  #define _IOSTRG         0100
  #define _IONOFD         _IOSTRG         /* strange or no file descriptor */
  #define _IORW           0400
  #define _IOUNGETC       01000
  #define _IOINUSE        02000           /* new flag for _THREAD_SAFE */
  #define _IONONSTD       04000
  #define _IOCLOSE        010000
  #define _IOWINIT        020000
  #define _IOWSET         040000
  ...

(Continue reading)

Colin Watson | 3 Jun 2013 13:05
Picon
Favicon
Gravatar

glob.c warnings

I get these warnings from a project using Gnulib 20130529:

  glob.c:165:1: warning: '__leaf__' attribute has no effect on unit local functions [-Wattributes]
  glob.c:213:1: warning: '__leaf__' attribute has no effect on unit local functions [-Wattributes]
  glob.c:214:1: warning: '__leaf__' attribute has no effect on unit local functions [-Wattributes]

These are from uses of __THROW on static functions.  Is it perhaps worth
using (and defining if necessary) __THROWNL instead, which I think would
pacify these warnings?

Thanks,

--

-- 
Colin Watson                                       [cjwatson <at> debian.org]

Daniel J Sebald | 2 Jun 2013 05:14
Picon

sig2str and str2sig use in C++

Hello gnulib folks,

Please consider placing extern "C" around the sig2str and str2sig 
declarations inside sig2str.h similar to the attached diff/changeset. 
We're looking at using the sig2str routine in Octave and removing some 
code from that project that is similar to what sig2str but not 
up-to-date with all the Unix SIG definitions that might exist.

I would also like you to consider the issue of duplicate signal 
definitions (i.e., different SIGxxxx using the same number such as 
SIGCHLD and SIGCLD).  Right now, sig2str will return only one string 
associated with the signal number (first appearance) even though 
internally the structure numname[] contains a complete list.  If someone 
wants to know all definitions, then sig2str doesn't really indicate 
that.  What do people think?  Should there be a routine that provides a 
complete listing?

Thank you,

Dan

Gmane