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: references to POSIX

2005-05-27 Thread Bruno Haible
Jim Meyering wrote: My only reservation was with the long URLs, so asked, and just learned (thanks to Andrew Josey) that we can use shortened URLs. E.g., this http://www.opengroup.org/susv3xsh/gai_strerror.html redirects to this:

[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: findutils doesn't compile on sunos 4.1.4

2005-06-03 Thread Bruno Haible
James Youngman wrote: Certainly I believe that stdlib.h should define NULL (though my copy of the standard isn't to hand). On SunOS 4, it doesn't. GNU gettext has this ChangeLog entry: 2001-10-31 Bruno Haible [EMAIL PROTECTED] * plural.y: Include stddef.h, needed for NULL with SunOS

[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

[bug-gnulib] Re: findutils doesn't compile on sunos 4.1.4

2005-06-03 Thread Bruno Haible
Derek Price asked: In a recent discussion on bug-gnulib of the GNULIB stat lstat modules, GNULIB admins Jim Meyering, Bruno, and Paul Eggert agreed that it was no longer useful to support SunOS 4.1.4 in GNULIB since even Sun stopped supporting it over a year ago (handy dead OS reference here:

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: quote characters in stds

2005-06-07 Thread Bruno Haible
Simon Josefsson wrote: Is it possible to discuss how that relate to the [EMAIL PROTECTED] stuff recommended by gettext to solve the similar problem? I wouldn't expand on this, at least not in the GNU standards: very few people use these [EMAIL PROTECTED] or [EMAIL PROTECTED] catalogs. In 5

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: [bug-gnulib] quote characters in stds

2005-06-08 Thread Bruno Haible
Karl Berry wrote: Maybe you can reformulate the last two paragraphs in a way that is less incorrect? Sorry, since I do not see what is incorrect about them The main point is that it transmits the perception that decent Unicode support will take a few years. Whereas it's there already

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

binary-io.h fix

2005-06-08 Thread Bruno Haible
Hi, I committed this fix. 2005-06-08 Bruno Haible [EMAIL PROTECTED] * binary-io.h (fileno): Undefine before defining it. Avoids a gcc warning on mingw. *** binary-io.h 19 May 2005 17:17:15 - 1.3 --- binary-io.h 8 Jun 2005 19:24:24 - *** *** 1,5

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: UTF-8 support (was: quote characters in stds)

2005-07-11 Thread Bruno Haible
Paul Eggert wrote: I read your email containing accented letters with GNU Emacs 21.4 and Gnus 5.10.6, a combination that supports UTF-8. The UTF-8 support in Emacs 21.4 is minimal. Some people recommend the emacs-unicode-2 branch of the Emacs CVS. (Haven't tried it.) whose xterm doesn't

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: short opengroup URLs

2005-07-11 Thread Bruno Haible
Jim Meyering wrote: Here's his reply. I think this is sufficient to justify our using the shortened URLs. OK, so I committed the appended patch. Bruno diff -c -3 -r1.91 MODULES.html.sh *** MODULES.html.sh 6 Jul 2005 15:58:47 - 1.91 --- MODULES.html.sh 11 Jul 2005 11:17:55

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: size_max

2005-07-11 Thread Bruno Haible
file. * modules/xsize: Depend on size_max module for size_max.m4. 2005-01-21 Simon Josefsson [EMAIL PROTECTED] * size_max.h: New file. Fine with me. Please install this. +Maintainer: +Bruno Haible You can add yourself as a maintainer here. I wrote the macro, but you wrote

Re: check-module

2005-07-11 Thread Bruno Haible
Jim Meyering wrote: FYI, I ran this command (cd modules; ../check-module *) and saw some new warnings: There seems to be a portability problem with the check-module script: When I remove all the exceptions code from the check-module script and run (cd modules; ../check-module *) I don't

Re: [bug-gnulib] Re: proposal: lib/verify.h

2005-07-11 Thread Bruno Haible
Paul Eggert wrote: ! # define verify_expr(R) ((void) sizeof (verify_type__ (R))) This doesn't work in C++: gcc gives an error error: ISO C++ forbids defining types within sizeof However, Jim's first version with the NULL pointer works in C++ too: #define verify_expr(R) (void) ((verify_type__

Re: [bug-gnulib] Re: no rpl_mktime in mktime.c

2005-07-11 Thread Bruno Haible
Paul Eggert wrote: I thought that C++ was supposed to be namespace clean these days. So isn't a standard C++ program supposed to be able to do this? #define mktime(x) (x) #include ctime int i = mktime (0); No, this cannot work: ctime will typically contain a declaration like extern C {

Re: [bug-gnulib] same.c:78: error: `HAVE_LONG_FILE_NAMES' undeclared (first use in this function)

2005-07-11 Thread Bruno Haible
to avoid linker errors. Still it has the effect that if a program e.g. needs only tanl() it will have the code for sinl() in its executable. Here is a suggested fix: 2005-07-09 Bruno Haible [EMAIL PROTECTED] * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Conditionally AC_LIBSOURCE

Re: lgpl compatible files archive?

2005-07-11 Thread Bruno Haible
Paul Eggert wrote: alloca malloc realloc strtod atexit dup2 getcwd getpagesize memmove memset strerror regex ... Bruno, Jim -- do you have any objections to relicensing these? Fine with me: All these modules can reasonably be used in libraries. regex has traditionally been under GPL, but

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: [bug-gnulib] copyright message with(out) directives

2005-07-11 Thread Bruno Haible
Karl Berry wrote: Is it better for translators to use placeholder directives in the standard copyright message, like this (inherited in GNU Hello): printf (_(\ Copyright (C) %s Free Software Foundation, Inc.\n\ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\

support for multithread-safe libraries

2005-07-14 Thread Bruno Haible
Depends-on: configure.ac: gl_LOCK Makefile.am: lib_SOURCES += lock.h lock.c Include: lock.h License: LGPL Maintainer: Bruno Haible === lib/lock.h /* Locking in multithreaded situations. Copyright (C) 2005 Free Software Foundation

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

2005-07-14 Thread Bruno Haible
Paul Eggert wrote: xalloc-die, in contrast, doesn't have a substitute in gnulib; if you don't use gnulib xalloc-die but some gnulib code needs it, you have to implement it yourself (that is, the same API will not work unless you implement it). This seems to be what --avoid is for. Yes,

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

2005-07-14 Thread Bruno Haible
, argp.m4 reflects argp-namefrob.h. This patch should do it. If both unlocked-io.m4 and argp.m4 are used by a configure.ac, the tests will only appear once, thanks to AC_REQUIRE and AC_CHECK_DECLS_ONCE. Bruno 2005-07-14 Bruno Haible [EMAIL PROTECTED] * argp.m4 (gl_ARGP): Remove

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] Re: adding once-only initialization to lock module

2005-07-26 Thread Bruno Haible
Albert Chin wrote: I'd review this: http://mailman.mit.edu/pipermail/kerberos/2005-May/007723.html It details how the weak referenced stubs in libc on some systems work with pthread_once(). Thanks for the info. Indeed, on Solaris and HP-UX 11, the libc and libpthread both contain most of

Re: control of symbols exported by shared libraries

2005-07-27 Thread Bruno Haible
Simon Josefsson wrote: I mean, the symbols that are not intended to be exported should all be marked with static anyway. That's hardly possible in practice. The larger a library is, the larger is the ratio of internal versus exported symbols. If you want all internal symbols to be marked

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

2005-07-28 Thread Bruno Haible
My first guess is that the module is wrongly being compiled as C++, which does require the cast. A second guess is that the user is using gcc -Werror. Which falls back on the user. Bruno ___ bug-gnulib mailing list bug-gnulib@gnu.org

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] some headers prevent later code from using __attribute__

2005-07-30 Thread Bruno Haible
Ben Pfaff wrote: I would suggest using a different identifier, but if not, then it seems like the various versions should be the same, at least. Some make use of __attribute__ conditional on GCC 2.5 or later, others on GCC 2.8 or later. The results are thus going to vary based on the order

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: error: possibly undefined macro: AC_CHECK_HEADERS_ONCE

2005-08-10 Thread Bruno Haible
Stepan Kasal wrote: The macro gl_INCLUDED_REGEX contains this: m4_syscmd([test -f '$1']) ifelse(m4_sysval, 0, [ ... gl_PREREQ_REGEX ]) ... Why is the above trick necessary? Why should the macro expansion depend on the presence of the file? That appears to

Re: xvasprintf: don't depend directly on xalloc-die

2005-08-10 Thread Bruno Haible
Simon Josefsson wrote: Why was a hard dependency on xalloc-die added? Because xvasprintf.c calls xalloc_die(), and the majority of applications don't have their own xalloc_die substitute. Wasn't the point of separating xalloc-die from the xmalloc module to allow applications to supply its own

Re: [bug-gnulib] Re: strnlen.h needed?

2005-08-10 Thread Bruno Haible
Simon Josefsson wrote: Ok to install? strnlen is a GNU extension, according to libc manual. There were some discussion regarding strnlen.h, but the patch below has worked for me for a while. Any problems can be fixed later on. It seems correct to me. Looks OK to me too. Except I would add

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-11 Thread Bruno Haible
Simon Josefsson wrote: + printf (%s, prompt); You can simplify that to fputs (prompt); Oops, I meant: fputs (prompt, stdout). Sorry. No, I don't want a newline. fputs() doesn't output an extra newline. Only puts() does. +#include stdio.h +#include getline.h + +/* Get

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

2005-08-11 Thread Bruno Haible
Simon Josefsson wrote: So the entire M4 file read as below now. Correct? gl_cv_lib_readline vs. ac_cv_lib_readline_readline should be the same. HAVE_READLINE vs. HAVE_READLINE_READLINE_H should be the same. After this, you can commit it if it works. Let's see whether it also needs mention of

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] Re: Opening a can of worms: a readline gnulib module?

2005-08-12 Thread Bruno Haible
Oskar Liljeblad wrote: That's why you have xyz_LTLIBS, xyz_CFLAGS etc. One such example is PTHREAD_CFLAGS, would you prefer that or CFLAGSPTHREADS? I would prefer the former. HAVE_READLINE vs. READLINE_LIBS is just inconsistent. Either READLINE_PRESENT and READLINE_LIBS. Or HAVE_READLINE and

Re: [bug-gnulib] Non-standard types in public header files (was: Re: ssize_t)

2005-08-12 Thread Bruno Haible
Simon Josefsson wrote: I realized I couldn't use the ssize_t module directly in GnuTLS. GnuTLS uses ssize_t in its public header file Ouch. This is as bad as using 'bool' in public header files. The problem, of course, is that the installed header file cannot assume a config.h and the HAVE_*

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...

Re: [bug-gnulib] [PATCH]: strcasestr GnuLib module

2005-08-15 Thread Bruno Haible
Hi, Yoann Vandoorselaere wrote: Attached is a patch that implement strcasestr() in GNUlib. Your implementation, like the one in glibc, does not work correctly in multibyte locales. I'm not sure it's useful to add more functions to gnulib that do not work correctly in multibyte locales. Yes we

Re: [PATCH]: strcasestr GnuLib module

2005-08-15 Thread Bruno Haible
, Inc. !Written by Bruno Haible [EMAIL PROTECTED], 2005, !based on earlier glibc code. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *** *** 15,66 along

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-17 Thread Bruno Haible
Yoann Vandoorselaere wrote: About the strcasestr module, is there any reason why strcasestr is not redefined to rpl_strcasestr, since you plan that it will be a permanent strcasestr replacement ? The AC_DEFINE inside m4/strcasestr.m4 is meant to take care of this. Why doesn't it work for you?

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: change default --aux-dir

2005-08-25 Thread Bruno Haible
The default --aux-dir of . clutters up the top-level directory. Now that have agreed on a reasonable name for this directory, gnulib-tool does not need to do this any more. I'm changing the default --aux-dir to build-aux. Note: This is an INCOMPATIBLE change. You need to add an option --aux-dir=.

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

  1   2   3   4   5   6   7   8   9   10   >