Re: portability checks, errors and warnings

2007-02-24 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > "For testing portability, invoke 'gnulib-tool --import check-portability' >(or check-portability-unix if mingw is not among your portability targets), >then compile the program and look at the link time warnings. Use >gnulib-tool --import wi

Re: portability checks, errors and warnings

2007-02-23 Thread Bruno Haible
Hi Paul, all, > I want 'make' to fail if any module > uses ctime, since it's asking for trouble in portable code (it has > undefined behavior with out-of-range time stamps). I suppose someone > could write code that carefully bounds the time stamps and then uses > ctime; such code can "#undef cti

Re: portability checks, errors and warnings

2007-02-22 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > A linker warning with a one or two line text is better than a link error > because > > - We can enable a link warning even for cases where 90% of the uses of the > functions are ok, such as For cases like these, I'd rather not have a warning, as th

Re: portability checks, errors and warnings

2007-02-17 Thread Bruno Haible
Paul Eggert wrote on 2007-02-05: > > he will get a link error about function 'rpl_strstr', and will likely > > report it as a bug in gnulib. > > I don't think this will be much of a problem in practice. We can > assume maintainers will read the gnulib documentation so that they > know w

Re: portability checks, errors and warnings

2007-02-04 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > 1) If the maintainer has not included the strstr module but uses the > strstr function and activates _GL_CHECK_PORTABILITY: With your proposal > he will get a link error about function 'rpl_strstr', and will likely > report it as a bug in

Re: portability checks, errors and warnings

2007-02-04 Thread Bruno Haible
Paul Eggert wrote: > > What does "otherwise" mean? Either 'configure' finds the system's strstr > > OK or it finds problems. What is the third alternative? > > The third alternative is that 'configure' does not check whether the > the system's strstr is OK. Ah, I see: this is the case when the gn

Re: portability checks, errors and warnings

2007-02-04 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > I'm worried that if you activate the replacement > # define strstr rpl_strstr > with its lib/strstr.o file depending on _GL_CHECK_PORTABILITY, or if you > activate the declaration > extern char *strstr (char const *__haystack, char const *__needle); >

Re: portability checks, errors and warnings

2007-02-02 Thread Bruno Haible
Paul Eggert wrote: > > Therefore all problems that installers would face from this technique > > will be noticeable by the maintainer already. > > No, because the code might look like this (taken from mountlist): > > #ifdef MOUNTED_VMOUNT /* AIX. */ > ... > ignore = strstr (optio

Re: portability checks, errors and warnings

2007-02-02 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > Therefore all problems that installers would face from this technique > will be noticeable by the maintainer already. No, because the code might look like this (taken from mountlist): #ifdef MOUNTED_VMOUNT /* AIX. */ ... ignore = st

portability checks, errors and warnings

2007-02-01 Thread Bruno Haible
Paul Eggert wrote: > > it can define GNULIB_STRSTR itself: > > > > dnl Tell gnulib that the non-i18n implementation of strstr() is enough > > dnl for our purposes. > > AC_DEFINE([GNULIB_STRSTR], 1) > > This sounds a bit fragile. mountlist can use a non-i18n > version of strstr but maybe som