Re: [bug-gnulib] Re: [bug-gnulib] [bug-gnulib] gnulib-tool treatment of gl_USE_SYSTEM_EXTENSIONS

2005-05-04 Thread Bruno Haible
Oskar Liljeblad wrote: If we do this, we need to add an extra module 'gnu-source' with no file, just a module description containing configure.ac-early: AC_GNU_SOURCE. ... There's already such a module though - extensions. It loads AC_AIX and AC_MINIX too though, as well as

[bug-gnulib] Re: timegm license incompatibility

2005-05-09 Thread Bruno Haible
Paul Eggert wrote: On the other hand, it's meant as a replacement for glibc code that is LGPLed. Fellow gnulibers, do we have a general policy for this sort of thing? If not, I'm inclined to LGPL it. My guideline for deciding whether something can be LGPLed is: 1) Does the GNU project

Re: [bug-gnulib] [bug-gnulib] fts portability fix for hosts with unusual pointer semantics

2005-05-09 Thread Bruno Haible
Paul Eggert wrote: That reminds me; fts.c violates C89 in a couple of places, which could lead to core dumps on unusual hosts where void * and FTSENT const ** have differing runtime representations. I installed this patch into coreutils. +static int +fts_compar (void const *a, void const

[bug-gnulib] stdint_.h update

2005-05-14 Thread Bruno Haible
Hi, I committed this patch. It enables the use of 64-bit integer types in MSVC (which is also the compiler used in 'uwin'). 2005-05-13 Bruno Haible [EMAIL PROTECTED] * stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t, int_fast64_t, uint_fast64_t, intmax_t

[bug-gnulib] Re: same, utimecmp should depend on minmax

2005-05-23 Thread Bruno Haible
Paul Eggert wrote: Won't this run into a problem when (for example) private headers include system headers? E.g., // module being implemented #include my-interface.h // system headers #include stdio.h // gnulib and private headers #include minmax.h #include

Re: [bug-gnulib] [bug-gnulib] New getlogin_r module

2005-05-25 Thread Bruno Haible
Derek Price wrote: +#if !HAVE_DECL_GETLOGIN_R +int getlogin_r (char *name, size_t size); +#endif Would you mind adding a bit of documentation? Something like /* Copies the user's login name to NAME. The array pointed to by NAME has room for SIZE bytes. Returns 0 if successful. Upon

Re: [bug-gnulib] [bug-gnulib] New getlogin_r module

2005-05-25 Thread Bruno Haible
Derek Price wrote: +Depends-on: +memcpy Modules of the category Support for systems lacking ANSI C 89 are not listed among dependencies. We assume that projects needing support for KR C and SunOS 4 will collect these modules themselves. Bruno ___

[bug-gnulib] Re: comparison_fn_t

2005-05-27 Thread Bruno Haible
Oskar Liljeblad wrote: GNU libc defines comparison_fn_t in stdlib.h if _GNU_SOURCE is defined. The type is defined like this: typedef int (*comparison_fn_t) (const void *, const void *); I tend to use this type a little everywhere, so I would like to make a module for this definition.

[bug-gnulib] Re: comparison_fn_t

2005-05-27 Thread Bruno Haible
Oskar Liljeblad wrote: extern void my_sort (void *, size_t, size_t, int (*) (const void *, const void *)); Sure, but assume you're passing strcmp for the comparison function, wouldn't you want to cast it to avoid the warning? Yes, and there's nothing wrong with

[bug-gnulib] references to POSIX

2005-05-27 Thread Bruno Haible
Hi, For those modules which implement some functionality specified by POSIX, I propose to add a reference to the POSIX spec as an URL. This is a handy reference. See attached patch. Files affected: getaddrinfo.h (Simon Josefsson) getcwd.h (all) inet_ntop.h(Yoann Vandoorselaere)

[bug-gnulib] Re: stat and lstat should define their replacements

2005-05-27 Thread Bruno Haible
Jim Meyering wrote: We should try hard not to let the bugs of a few broken systems push us into polluting our interfaces with the work-arounds. ... ... BTW, I suspect that testing for the HAVE_LSTAT_EMPTY_STRING_BUG code isn't useful anymore. It works around bugs in SunOS4.1.4 and vintage

[bug-gnulib] Re: stat and lstat should define their replacements

2005-05-30 Thread Bruno Haible
Paul Eggert wrote: ! static int ! rpl_lstat (const char *file, struct stat *sbuf) Surely the static should go? Yes, sure. Thanks. Bruno ___ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib

[bug-gnulib] Re: gettextize mkinstalldirs

2005-05-30 Thread Bruno Haible
Karl Berry wrote: When I ran gettextize to update the hello sources to gettext 0.14.5, it added build-aux/mkinstalldirs to the top-level EXTRA_DIST. That's normal. po/Makefile.in.in makes use of the mkinstalldirs script. mkinstalldirs was not an included file in the gnulib gettext module

[bug-gnulib] Re: references to POSIX

2005-05-31 Thread Bruno Haible
Jim Meyering wrote: The sections with redirects are: /susv3xsh /susv3xcu /susv3xrat /susv3xbd /susv3 ... Andrew agreed to add the five symlinks corresponding to those redirects, so that they'll appear in the downloadable HTML archives when he next regenerates them. OK, then we

[bug-gnulib] Re: getopt depending on gettext

2005-05-31 Thread Bruno Haible
Werner LEMBERG wrote: E.g., you could do this: #if ENABLE_NLS # include gettext.h # define _(msgid) gettext (msgid) #else # define _(msgid) msgid #endif ... I really prefer a `real' fix, this is, adding the above code to the affected source files. For me, it looks `more right'.

[bug-gnulib] Re: new modules for C# interoperability

2005-06-01 Thread Bruno Haible
Haible lib/csharpcomp.sh.in #!/bin/sh # Compile a C# program. # Copyright (C) 2003-2005 Free Software Foundation, Inc. # Written by Bruno Haible [EMAIL PROTECTED], 2003. # # This program is free software; you can redistribute it and/or modify

[bug-gnulib] work around poll() bug in MacOS X 10.4

2005-06-01 Thread Bruno Haible
/0 1 - 0 fd = 1: 1/0 4 - 4 fd = 3: 0/0 1 - 0 fd = 4: 1/0 4 - 4 fd = 5: 1/0 1 - 1 fd = 6: 1/0 4 - 4 but this on MacOS X 10.4.0: fd = 0: 1/0 1 - 32 fd = 1: 1/0 4 - 32 fd = 3: 1/0 1 - 32 fd = 4: 1/0 4 - 32 fd = 5: 1/0 1 - 32 fd = 6: 1/0 4 - 32 Here is a proposed patch for gnulib. 2005-06-01 Bruno

[bug-gnulib] Re: gcc -Wall warning for minmax.h

2005-06-03 Thread Bruno Haible
Derek Price wrote: Actually, `m4_popdef' is documented explicitly in my Autoconf 2.59 manual. The Autoconf 2.59 manual also contains the following text: With a few exceptions, all the M4 native macros are moved in the `m4_' pseudo-namespace, e.g., M4sugar renames `define' as

Re: [bug-gnulib] [ADMIN] the bug-gnulib prefix

2005-06-06 Thread Bruno Haible
Stepan Kasal wrote: Let me remind you that if you want to filter the postings to a separate folder, and if you use procmail, you can use the following recipe: :0: * ^List-Post:[EMAIL PROTECTED] bug-gnulib-new You can also mark the mails in the subject line, without moving them to a

Re: [bug-gnulib] quote characters in stds

2005-06-07 Thread Bruno Haible
Karl Berry wrote: @node Quote characters @section Quote characters @cindex quote characters In the C locale, GNU programs should stick to plain ASCII for quotation characters in messages to users: either 0x60 (`) for left quotes and 0x27 (') for right quotes, or ' for both opening and

Re: [bug-gnulib] quote characters in stds

2005-06-07 Thread Bruno Haible
Karl Berry wrote: Yes, but rms has explicitly rejected (in previous email with me) the idea of recommending the use of UTF-8 in any context whatsoever. Sigh. Sigh. What you wrote there: If you need to use non-ASCII characters, for example to represent names of contributors, you should

Re: new modules for C# interoperability

2005-06-08 Thread Bruno Haible
There were no comments on csharpcomp, so I committed this module as well. Bruno ___ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib

mbrtowc.m4 on mingw32

2005-07-04 Thread Bruno Haible
Hi, On mingw32, mbrtowc.m4 detects that mbrtowc() exists, leading to link errors. Actually, mbrtowc() does not exist on this system, it's only declared in wchar.h but not actually implemented under this name. config.log shows this: configure:26506: checking whether mbrtowc and mbstate_t are

Re: [bug-gnulib] Re: mbrtowc.m4 on mingw32

2005-07-06 Thread Bruno Haible
Paul Eggert wrote: Yes, if the current Autoconf macro works for Bruno, we should simply use a copy of it in gnulib. Yes, this macro works on mingw as well. I committed this patch. 2005-07-05 Bruno Haible [EMAIL PROTECTED] * mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from

Re: [bug-gnulib] Re: warning: comparison is always false due to limited range of data type

2005-07-11 Thread Bruno Haible
Paul Eggert wrote: Shouldn't we simply fix GCC instead? I agree. The appended simpler test case (with 'unsigned short' instead of 'unsigned int', to see the warning on a 32-bit platform as well) produces the warning with gcc -Wall, even without -W, with any of 3.3.1, 3.4.3, 4.0.0. It appears

Re: [bug-gnulib] Re: should argp depend on unlocked-io?

2005-07-11 Thread Bruno Haible
automake: In my opinion it should depend on unlocked-io. Thanks for reporting. What about this patch, then? Add the dependency to the module description. It's then unnecessary to mention it in the autoconf macro. 2005-07-09 Bruno Haible [EMAIL PROTECTED] * modules/argp: Depend

Re: [bug-gnulib] Re: libtool 2.1a failed mdemo-make.test on Solaris

2005-07-11 Thread Bruno Haible
Ralf Wildenhues wrote: It's a bit tricky to reproduce: You need a system which has no argz.h, then configure, then `make check' without prior make. If you had ever run `make' before in this build tree, even after `make clean' the dependency information is stored in libltdl/.deps/*.Plo, and

Re: [bug-gnulib] Re: check_version

2005-07-11 Thread Bruno Haible
Simon Josefsson wrote: +const char * +check_version (const char *req_version) +{ + if (!req_version || strverscmp (req_version, VERSION) 0) +return VERSION; + + return NULL; +} ... You will typically wrap the call to the `check_version' function through a library API, your

Re: [bug-gnulib] new module gettext-h for programs that don't use i18n

2005-07-11 Thread Bruno Haible
suggest to undo the earlier commodity hacks and return to a state where the modules/* files represent the real dependencies. Namely, add back 'xalloc-die' as dependency to those modules need it. Not sure about 'unlocked-io'. Bruno 2005-07-09 Bruno Haible [EMAIL PROTECTED] * gnulib-tool

Re: support for multithread-safe libraries

2005-07-18 Thread Bruno Haible
Oskar Liljeblad wrote: http://autoconf-archive.cryp.to/acx_pthread.html That macro also contains this: case ${host_cpu}-${host_os} in *-aix* | *-freebsd* | *-darwin*) flag=-D_THREAD_SAFE;; *solaris* | *-osf* | *-hpux*) flag=-D_REENTRANT;; esac But on

adding once-only initialization to lock module

2005-07-18 Thread Bruno Haible
. Bruno 2005-07-16 Bruno Haible [EMAIL PROTECTED] * lock.h (gl_once_t): New type. (gl_once_define, gl_once): New macros. * lock.c (fresh_once): New variable. (glthread_once, glthread_once_call, glthread_once_singlethreaded): New functions. diff -c -3 -r1.1

Re: support for multithread-safe libraries

2005-07-18 Thread Bruno Haible
Oskar Liljeblad wrote: http://autoconf-archive.cryp.to/acx_pthread.html uses a set of tests for pthread support. Thanks for the info. I'll use this as a reference when there's need to. Some notes from it: -lpthreads AIX (must check this before -lpthread) (no flags) in case threads

Re: libtool 2.1a failed mdemo-make.test on Solaris

2005-07-22 Thread Bruno Haible
, the rule predates the use of BUILT_SOURCES.) Thanks for the hint. I propose this patch in gnulib. Bruno 2005-07-22 Bruno Haible [EMAIL PROTECTED] * modules/alloca-opt (Makefile.am): Remove explicit dependency on $(ALLOCA_H), redundant through BUILT_SOURCES. * modules

control of symbols exported by shared libraries

2005-07-25 Thread Bruno Haible
= Description: Control of symbols exported by shared libraries. Files: m4/visibility.m4 Depends-on: configure.ac: gl_VISIBILITY Makefile.am: Include: License: LGPL Maintainer: Bruno Haible == m4/visibility.m4 == # visibility.m4 serial

Re: control of symbols exported by shared libraries

2005-07-25 Thread Bruno Haible
Simon Josefsson wrote: gcc-4.0 now provides support for controlling the set of symbols exported from a shared library in a reasonable, maintainable way. I have added a gnulib module to this effect. With documentation, this time :-) How does this relate to something like Libtool's

Re: control of symbols exported by shared libraries

2005-07-25 Thread Bruno Haible
Albert Chin wrote: The AIX v7 compiler compiles the following: $ cat vis.c extern __attribute__((__visibility__(hidden))) int hiddenvar; extern __attribute__((__visibility__(default))) int exportedvar; extern __attribute__((__visibility__(hidden))) int hiddenfunc (void); extern

Re: [bug-gnulib] gcc 3.4.4 cast warnings?

2005-07-30 Thread Bruno Haible
Oskar Liljeblad wrote: My first guess is that the module is wrongly being compiled as C++, which does require the cast. He *was* compiling it using g++. User error. C is not a subset of C++. A C++ compiler is not a C compiler. Is there a GNU coding standard statement for 'void *' casts?

Re: [bug-gnulib] Re: [patch] byteswap module fails when building from subdir

2005-07-30 Thread Bruno Haible
Oskar Liljeblad wrote: byteswap.h: byteswap_.h - cp $(srcdir)/$ [EMAIL PROTECTED] + cp $(srcdir)/byteswap_.h [EMAIL PROTECTED] mv [EMAIL PROTECTED] $@ Can you please explain why this is necessary, so that I won't make the same mistake in the future again? See the

Re: [bug-gnulib] regex problems

2005-08-03 Thread Bruno Haible
Sam Steingold wrote: when trying to upgrade to the latest gnulib regexp, I encountered the following problems: 1. g++ cannot compile regexp: ./regex.h:569: error: expected primary-expression before __restrict__ ./regex.h:569: error: expected `]' before __restrict__ ./regex.h:569: error:

Re: strnlen.h needed?

2005-08-11 Thread Bruno Haible
Simon Josefsson wrote: but now there is a comment in both strnlen.c and strnlen.h. Should we remove one of them? No. We keep the comment in strnlen.h because that's where most users will look at (in case they are on a machine where man strnlen doesn't work). And the one in the .c file, we keep

Re: Opening a can of worms: a readline gnulib module?

2005-08-11 Thread Bruno Haible
Simon Josefsson wrote: Any objections to this readline module? There were some discussion, but no real objection from what I could tell. There was the objection that some packages need more from GNU readline than just one function. Therefore you will need to add more functions upon demand :-)

Re: Opening a can of worms: a readline gnulib module?

2005-08-12 Thread Bruno Haible
this patch. Bruno 2005-08-12 Bruno Haible [EMAIL PROTECTED] * readline.m4 (gl_FUNC_READLINE): Look for ncurses first. *** readline.m4 12 Aug 2005 08:03:21 - 1.3 --- readline.m4 12 Aug 2005 11:39:00 - *** *** 1,4 ! # readline.m4 serial 2 dnl Copyright (C

Re: ssize_t

2005-08-12 Thread Bruno Haible
Simon Josefsson wrote: GnuTLS need ssize_t, but there is no module for it right now. How about the patch below? Looks OK to me. I'm not sure what the License field for ssize_t.m4 should be. The M4 file says: dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. dnl This file is

Re: [bug-gnulib] isascii

2005-08-12 Thread Bruno Haible
Simon Josefsson wrote: isascii is not part of C89, but POSIX: http://www.opengroup.org/onlinepubs/009695399/functions/isascii.html Do you know about a system that doesn't have it? What about using c_isascii from the c-ctype module? Bruno ___

Re: [bug-gnulib] gettext compilation problem on FreeBSD

2005-08-15 Thread Bruno Haible
Oskar Liljeblad wrote: I'm having a little problem compiling gettext support using recent Gnulib gettext module on FreeBSD 5.4. Or should I say: A user of one of my programs has this problem, not me. Here's some snippets from the build log: checking build system type...

new modules 'mbchar', 'mbiter', 'mbfile', 'strnlen1'

2005-08-16 Thread Bruno Haible
Hi, Prompted by the need to implement a correct strcasecmp() function, I added to gnulib the modules: - mbchar: Multibyte character data type. - mbiter: Iterating through multibyte strings. - mbfile: Multibyte character I/O. These modules were written in 2001, mbchar and mbiter by me,

Re: [PATCH]: strcasestr GnuLib module

2005-08-16 Thread Bruno Haible
License as published by --- 1,7 ! /* Case-insensitive string comparison function. !Copyright (C) 1998, 1999, 2005 Free Software Foundation, Inc. !Written by Bruno Haible [EMAIL PROTECTED], 2005, !based on earlier glibc code. This program is free software; you can redistribute

Re: [PATCH]: strcasestr GnuLib module

2005-08-17 Thread Bruno Haible
So I dug out an earlier 'mbchar' abstraction, and rewrite strcasecmp() as follows. Now I split the iterator out into a separate module 'mbuiter', and simplified strcasecmp.c accordingly. Bruno ___ bug-gnulib mailing list bug-gnulib@gnu.org

strcasestr module

2005-08-17 Thread Bruno Haible
for a substring in a string. Files: lib/strcasestr.h lib/strcasestr.c m4/strcasestr.m4 m4/mbrtowc.m4 Depends-on: mbuiter configure.ac: gl_FUNC_STRCASESTR Makefile.am: lib_SOURCES += strcasestr.h Include: strcasestr.h License: LGPL Maintainer: Bruno Haible == lib

make strstr multibyte-safe

2005-08-17 Thread Bruno Haible
the bytewise search function.) 2005-08-17 Bruno Haible [EMAIL PROTECTED] * modules/strstr (Files): Add m4/mbrtowc.m4. (Depends-on): Add mbuiter. * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function. * lib/strstr.c: Completely rewritten, with multibyte

Re: strcasestr module

2005-08-19 Thread Bruno Haible
I added this bugfix to the new strstr and strcasestr implementations. diff -c -3 -r1.1 strcasestr.c *** strcasestr.c17 Aug 2005 14:09:19 - 1.1 --- strcasestr.c19 Aug 2005 11:00:06 - *** *** 88,94 { if

Re: [bug-gnulib] regex warnings on linux

2005-08-19 Thread Bruno Haible
Sam Steingold wrote: fc4: In file included from regex.c:86: regcomp.c: In function 'regerror': regcomp.c:563: warning: implicit declaration of function 'mempcpy' regcomp.c:563: warning: incompatible implicit declaration of built-in function ' mempcpy' regcomp.c: In function

Re: [bug-gnulib] getline: protect prototype better

2005-08-23 Thread Bruno Haible
Simon Josefsson wrote: How about this? If for some reason HAVE_DECL_GETLINE is not defined at all, the header file fail to parse. What's the point in trying to use lib/getline.c without m4/getline.m4 ? We engage ourselves to maintain both in sync, since they are part of a single gnulib module.

Re: [bug-gnulib] quotearg.c fails when multibyte processing is disabled

2005-08-23 Thread Bruno Haible
Simon Josefsson wrote: How about this? 2005-08-23 Simon Josefsson [EMAIL PROTECTED] * quotearg.c [!HAVE_MBRTOWC]: Map mbstate_t to int, so that compilation suceed when multibyte processing is disabled. The invocation of AC_TYPE_MBSTATE_T in m4/quotearg.m4 is supposed to

Re: getline: protect prototype better

2005-08-23 Thread Bruno Haible
Simon Josefsson wrote: This was also discovered while porting GNU SASL to uClinux. Perhaps I should investigate how difficult it would be to make uClinux run ./configure properly instead of maintaining the HAVE_* symbols manually. Definitely. uClinux has a shell and a compilation environment

Re: [bug-gnulib] Re: getpass: use of termios.h problematic

2005-08-24 Thread Bruno Haible
Simon Josefsson wrote: How about this patch? 2005-08-23 Simon Josefsson [EMAIL PROTECTED] * getpass.c (__fsetlocking): Define to nothing unless we have it. 2005-08-23 Simon Josefsson [EMAIL PROTECTED] * getpass.m4: Check for __fsetlocking. Looks good to me. Bruno

Re: [bug-gnulib] Re: regex g++

2005-08-24 Thread Bruno Haible
Paul Eggert wrote: Is there some simple way that we can work around this in the regex code, without having to make wholesale changes? For example, can we surround all the code with extern C { ... } when compiling with C++? No, extern C only affects the name mangling of symbols and the

Re: getdelim doesn't set errno on failure?

2005-08-24 Thread Bruno Haible
Oskar Liljeblad wrote: Here's what getdelim in Gnulib returns: =0, errno undefined, feof (getc returned EOF, reached end of file) =0, errno!=0, ferror (getc returned EOF, read failed) Actually I think the glibc doc means that -1 is returned if EOF or read failure occurs before the

Re: getdelim doesn't set errno on failure?

2005-08-24 Thread Bruno Haible
Jim Meyering wrote: Note that POSIX *does* require a failed malloc call to set errno to ENOMEM, albeit with CX shading (meaning IEEE Std 1003.1-2001). http://www.opengroup.org/susv3xsh/malloc.html Let's try not to let substandard systems dictate interface design. If some system has a poor

Re: ISO C 99 versus POSIX 2001

2005-08-24 Thread Bruno Haible
Jim Meyering wrote: ... a prescribed norm: relatively-recent POSIX. ... My point is that Gnulib development should not be held hostage to a system that is behind the standards curve. I disagree. Gnulib's purpose is to provide portability across the mainstream systems, _regardless_ whether

Re: [bug-gnulib] sysexits.h: Define EX_OK

2005-08-24 Thread Bruno Haible
Martin Lambers wrote: Back in February, I suggested to add EX_OK to the sysexit module (http://lists.gnu.org/archive/html/bug-gnulib/2005-02/msg00042.html). Is there a reason not to do that? Regards, Martin --- sysexit_h.orig2005-08-24 17:47:34.966600112 +0200 +++ sysexit_h

gnulib-tool: fix autoreconf invocation

2005-08-25 Thread Bruno Haible
Currently, a megatestdir will, during the first ./configure; make, rebuild config.h, requiring autoconf and automake in the PATH. This fixes it. * gnulib-tool (func_create_megatestdir): Call autoreconf without the option --force, because --force causes the aclocal.m4 of each

gnulib-tool: small output tweak

2005-08-25 Thread Bruno Haible
Alexandre Duret-Lutz recommends that all autoconf macro invocations should quote their arguments. This patch does it in gnulib-tool. * gnulib-tool (func_import, func_create_testdir, func_create_megatestdir): Quote all autoconf macro arguments. *** gnulib-tool.bak 2005-08-16

gnulib-tool: update --version output

2005-08-25 Thread Bruno Haible
! echo Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! echo Written by Bruno Haible } # func_fatal_error message --- 108,117

gnulib-tool: generalize --aux-dir

2005-08-25 Thread Bruno Haible
This patch makes --aux-dir work for the other modes than --import. * gnulib-tool: Add support for the --aux-dir option to --create-testdir, --create-megatestdir, --test, --megatest. (func_create_testdir, func_create_megatestdir): Optionally emit a AC_CONFIG_AUX_DIR

Re: [bug-gnulib] Re: error: possibly undefined macro: AC_CHECK_HEADERS_ONCE

2005-08-25 Thread Bruno Haible
Sam Steingold wrote: gnulib CVS head does not contain gl_INCLUDED_REGEX. Paul removed this macro; you need to call gl_REGEX without arguments, now. Bruno ___ bug-gnulib mailing list bug-gnulib@gnu.org

Re: [bug-gnulib] gettimeofday() for Win32

2005-08-25 Thread Bruno Haible
Hi, Martin Lambers wrote: I'd like to provide a gettimeofday() function for systems that do not have it (at least Win32). I already wrote a module that works, see below. But this module overwrites the existing gettimeofday module. I do not know how to integrate the changes into the existing

Re: [bug-gnulib] Re: error: possibly undefined macro: AC_CHECK_HEADERS_ONCE

2005-08-25 Thread Bruno Haible
Stepan Kasal wrote: There was one remaining problem: AC_GNU_SOURCE has to be called early in configure.ac. ... @@ -4,6 +4,7 @@ AC_PREREQ(2.57) AC_INIT(regexp, 1.0, clisp-list) +AC_GNU_SOURCE AC_CONFIG_SRCDIR(regexp.lisp) AC_CONFIG_AUX_DIR(../../src/build-aux) AC_CONFIG_HEADERS(config.h)

gnulib-tool: robustness fix

2005-08-29 Thread Bruno Haible
I applied this: * gnulib-tool: Enclose all occurrences of $destdir in ..., so that it works when the directory contains spaces. *** gnulib-tool.bak 2005-08-25 14:36:00.0 +0200 --- gnulib-tool 2005-08-29 00:10:56.0 +0200 *** *** 789,795

gnulib-tool --import: more advice

2005-08-29 Thread Bruno Haible
To make gnulib-tool a little more developer-friendly: * gnulib-tool (func_import): Emit more comments into gnulib.m4. Emit more advice. *** gnulib-tool.bak 2005-08-29 00:16:05.0 +0200 --- gnulib-tool 2005-08-29 00:10:56.0 +0200 *** *** 836,839

Re: iconv_alloc for iconvme module

2005-08-29 Thread Bruno Haible
Oskar Liljeblad wrote: Thanks. I didn't know free could clobber errno. (Do you know a system where it does?) Yes: glibc systems. free() gives back unused memory to the system by calling munmap(). munmap() can clobber errno. Bruno ___ bug-gnulib

Re: gnulib-tool changes

2005-08-31 Thread Bruno Haible
Simon Josefsson wrote: Yay! I considered dropping use of gnulib in libgnutls yesterday, because I wanted the error module for the tools, but that module need a program_name variable. When the library didn't provide one, there were linker failures. I added a dummy 'char *program_name =

Re: [bug-gnulib] socklen_t

2005-08-31 Thread Bruno Haible
Normally sys/types.h and sys/socket.h should be sufficient to get socklen_t. Which are the systems where it needs netdb.h? Bruno ___ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib

Re: socklen_t

2005-09-01 Thread Bruno Haible
Simon Josefsson wrote: POSIX says both sys/socket.h and netdb.h should declare socklen_t, I was thinking of the case where a system doesn't have sys/socket.h but has netdb.h. Yes, this is the case that can cause trouble. Some very old systems fall in this category. Do you think we should

Re: gnulib-tool changes

2005-09-01 Thread Bruno Haible
Simon Josefsson wrote: Yup, I'm using two configure.ac's in gsasl, but I don't want to change gnutls to use the same scheme for only this reason. And with your work, I don't have to. OK, can you try it? The essential changes are already in CVS. How about storing the parameters in the

Re: [bug-gnulib] Re: socklen_t

2005-09-01 Thread Bruno Haible
Albert Chin wrote: We created the following macro for curl. It's been tested on the following systems: AIX 4.3.3, 5.1, 5.2, 5.3 HP-UX 10.20, 11.00, 11i IRIX 6.5 Redhat Linux 7.1, 9 RHEL 2.1, 3, 4 Solaris 2.5.1, 2.6, 7, 8, 9, 10/SPARC Tru64 UNIX 4.0D, 5.1 ...

Re: gnulib-tool changes

2005-09-01 Thread Bruno Haible
Simon Josefsson wrote: I'll use GnuTLS as the test subject for this. First impressions: [EMAIL PROTECTED]:~/src/gnutls$ gnulib-tool --import gnulib-tool: *** missing --source-base option gnulib-tool: *** Stop. [EMAIL PROTECTED]:~/src/gnutls$ That used to work Fixed now. Then I tried to

Re: [bug-gnulib] Re: socklen_t

2005-09-01 Thread Bruno Haible
Simon Josefsson wrote: A bit weird approach of checking for a compatible type, perhaps, but if it works, then I'm all for it. Bruno, what do you think? It's the standard way of determining a function's prototype. At first sight, it would be possible to use a single loop instead of a double

AC_LIBSOURCES considered harmful

2005-09-02 Thread Bruno Haible
Hi Paul, Jim, Alexandre, gnulib-tool now supports multiple gnulib directories with a single configure.ac. Simon needs this in GnuTLS. I need this in libglocale. But half of gnulib doesn't work with gnulib-tool. Due to AC_LIBSOURCES. Paul and Jim, you pushed towards using AC_LIBSOURCES. Could

Re: lib-link.m4: lib64

2005-09-02 Thread Bruno Haible
Simon Josefsson wrote: Btw, can't we make a module for this? readline need the macro, and was only including m4/lib-link.m4, not lib-prefix.m4, and maintaining which m4 macros depend on each other manually for every module seems like work. Better to make a lib-link module, and make readline

Re: AC_LIBSOURCES considered harmful

2005-09-02 Thread Bruno Haible
Hi Jim, The problem you describe was more of an automake limitation, and it has been resolved by automake's addition of AC_CONFIG_LIBOBJ_DIR. Interesting. But AC_CONFIG_LIBOBJ_DIR is documented just between AC_CONFIG_AUX_DIR and AC_CONFIG_HEADERS, which makes me believe that only a single call

Re: [bug-gnulib] gnulib-tool --import slowness

2005-09-02 Thread Bruno Haible
Simon Josefsson wrote: Running gnulib-tool --import has become slow: [EMAIL PROTECTED]:~/src/gnutls$ time gnulib-tool --import ... real0m47.043s user0m19.559s sys 0m10.299s [EMAIL PROTECTED]:~/src/gnutls$ This is on GnuTLS, which uses: gl_MODULES([error getline getpass

Re: [bug-gnulib] [PATCH]: gnulib-tool always symlink

2005-09-05 Thread Bruno Haible
Yoann Vandoorselaere wrote: With the latest gnulib-tool update, any invocation of gnulib-tool will result in symlinked sources files. The patch also fix a --macro-prefix typo in the 'Reproduce by' summary. Thanks! Both of your fixes were good and have been applied. Bruno

Re: [bug-gnulib] bug: {m, re}alloc expects live pointers form {m, re}alloc(0) (patch included)

2005-09-06 Thread Bruno Haible
Hi, The xmalloc and xrealloc functions defined in lib/xmalloc.c expect live pointers to be always returned form system's malloc and realloc function. This is an invalid assumption for most (all?) libc implementations ... This was fixed in gnulib by Paul Eggert: 2004-05-30 Paul Eggert

Re: [bug-gnulib] Re: socklen_t

2005-09-08 Thread Bruno Haible
Simon Josefsson wrote: Can I install this? Albert Chin proposed a better M4 test, but the legal procedure will take time, and I'm already using my version in a few projects. When the legal problems has been fixed, we can change it to use the new macro and test that. What do you think?

Re: [bug-gnulib] Re: mmapping of /dev/zero always fails on darwin

2005-09-13 Thread Bruno Haible
Peter O'Gorman wrote: Just doing the same thing as gnulib does will show the failure: int main(){ void * address = NULL; static int fd =-1; int ret = 0; fd = open (/dev/zero,O_RDONLY,666); ret = mmap (NULL, 4096, PROT_READ | PROT_WRITE, MAP_FILE

Re: mmapping of /dev/zero always fails on darwin

2005-09-14 Thread Bruno Haible
Derek Price wrote: Generally, I choose to be pessimistic about test failures when cross-compiling. Anyone have an opinion about whether I should be pessimistic always or just when the target system name matches gcc's list of systems which fail this test? Generally, I try to use this

Re: [bug-gnulib] Re: config.h inclusion

2005-09-14 Thread Bruno Haible
Ralf Wildenhues wrote: Thinking out loud, `#if HAVE*' vs. `#ifdef HAVE*' also could be uniformized for other values of `*' .. not sure it's worth the effort. If we were to do this, then towards #if, not towards #ifdef. $ grep '# *if HAVE_' *.h *.c | wc -l 429 $ grep '# *ifdef HAVE_' *.h

Re: [bug-gnulib] Incomplete getaddrinfo module

2005-09-15 Thread Bruno Haible
Yoann Vandoorselaere wrote: The getaddrinfo module in GnuLib will often result in broken application behavior because it is really a simple replacement which fail to handle very common getaddrinfo usage pattern. A common example of why it might fail is: if (hints (hints-ai_flags

Re: [bug-gnulib] strstr redefinition fix

2005-09-15 Thread Bruno Haible
Derek Price wrote: The new strstr module is causing a redefinition warnings from many files and then strstr.c fails to compile thus on an Alpha Linux 2.2.20 system running gcc 2.95.4: gcc -DHAVE_CONFIG_H -I. -I/home/users/d/de/derekrprice/cvs-nightly/lib -I.. -Ino/include -g -O2 -c

Re: [bug-gnulib] strstr redefinition fix

2005-09-15 Thread Bruno Haible
Derek Price wrote: Bruno Haible wrote: Thanks. I applied the appended patch, very similar to yours. (But move the #include outside the extern C { ... }.) Any reason why you left this inside? + #undef strstr + #define strstr rpl_strstr Just because it didn't matter? Yes, because

Re: [bug-gnulib] gnulib-tool --import slowness

2005-09-19 Thread Bruno Haible
Derek Price wrote: Bruno Haible wrote: files. I'll change this to use join and sort instead of a double loop. Did you do this? I'm still getting pretty slow operation with CVS: $ time maint-aux/gnulib-update real14m42.968s user3m45.188s sys 10m41.704s $ Just a few weeks

Re: [bug-gnulib] gnulib-tool --import slowness

2005-09-19 Thread Bruno Haible
Derek Price wrote: The --tests-base option is no longer defaulting to tests as `gnulib-tool --help' specifies, however: gnulib-tool: *** missing --tests-base option gnulib-tool: *** Stop. Fixed. Thanks for reminding me. Bruno ___ bug-gnulib

Re: [bug-gnulib] gnulib-tool --import: gl/m4/gnulib-cache.m4 is expected to contain gl_M4_BASE([gl/m4])

2005-09-20 Thread Bruno Haible
Simon Josefsson wrote: [EMAIL PROTECTED]:~/src/gss$ gnulib-tool --import gnulib-tool: *** gl/m4/gnulib-cache.m4 is expected to contain gl_M4_BASE([gl/m4]) gnulib-tool: *** Stop. [EMAIL PROTECTED]:~/src/gss$ Problem is, the file contain gl/m4/ (trailing '/'), see entire file below. Is this

Re: unicodeio.c: accidental extern function: unicode_to_mb

2005-09-21 Thread Bruno Haible
Hi Jim, Jim Meyering wrote: Since unicode_to_mb is not declared in any other file that I can see, nor is it used elsewhere in gnulib, I suspect it really should have file scope. No. On the contrary. The declaration is missing in unicodeio.h. I didn't write this function with two callback

Re: [bug-gnulib] new gnulib module verify for compile-time assertions

2005-09-23 Thread Bruno Haible
; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ ! /* Written by Paul Eggert, Jim Meyering, Bruno Haible. */ #ifndef VERIFY_H # define VERIFY_H 1 *** *** 26,36 /* A type that is valid if and only

Re: new gnulib module verify for compile-time assertions

2005-09-23 Thread Bruno Haible
, Fifth Floor, Boston, MA 02110-1301, USA. */ ! /* Written by Paul Eggert, Jim Meyering, Bruno Haible. */ #ifndef VERIFY_H # define VERIFY_H 1 *** *** 24,31 # define GL_CONCAT0(x, y) x##y # define GL_CONCAT(x, y) GL_CONCAT0 (x, y) ! /* A type that is valid

Re: [bug-gnulib] Re: new gnulib module verify for compile-time assertions

2005-09-23 Thread Bruno Haible
Paul Eggert wrote: I suspect it may not be the last word, with all these screwy compilers to test). Indeed, IRIX 6.5 cc gives warning: signed bitfield of length 1. Changing the verify_type__ macro like this makes it work without warning. # define verify_type__(R) \ struct { int

Re: [bug-gnulib] Re: getaddrinfo needs socklen, sync from coreutils

2005-09-26 Thread Bruno Haible
Simon Josefsson wrote: I was thinking of a similar situation with strdup: I thought many modules used strdup without depending on the strdup module Huh? The modules canon-host, getaddrinfo, glob, hard-locale, iconvme, userspec all depend on strdup. And getpass doesn't, because it uses strdup()

Re: [bug-gnulib] problem with mbchar module on OpenBSD

2005-09-26 Thread Bruno Haible
to Yoann's fix. Bruno 2005-09-26 Bruno Haible [EMAIL PROTECTED] * modules/mbchar (Include): Mention that HAVE_WCHAR_H HAVE_WCTYPE_H is necessary. (lib_SOURCES): Remove mbchar.c. * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary. (Files): Add m4

  1   2   3   4   5   6   7   8   9   10   >