Re: [tin 2.4.0] snapshots - please test
Thomas Dickey <[email protected]> Tue, 9 Aug 2016 21:06:17 -0400
| Newsgroups | gmane.network.tin.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============5739018474186460471== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 09, 2016 at 04:10:07PM +0200, Corinna Vinschen wrote: > Hi Urs, >=20 > On Aug 9 13:35, Urs Jan=DFen wrote: > > I've made snapshots of the upcomming 2.4.0 release (planned for > > August 23rd), please give them a try and report (or even fix) any > > issues: > >=20 > > <ftp://ftp.tin.org/pub/news/clients/tin/v2.3/snapshots/tin-2.4.0.tar.xz> > > <ftp://ftp.tin.org/pub/news/clients/tin/v2.3/snapshots/tin-2.4.0.tar.bz= 2> > > <ftp://ftp.tin.org/pub/news/clients/tin/v2.3/snapshots/tin-2.4.0.tar.gz> >=20 > I encountered two build problems in the tin configury. >=20 > I was trying to build the snapshot on Cygwin and noticed lots of > warnings in terms of the strcasecmp function being undeclared. okay... =20 > To explain why I only noticed now, lately newlib and Cygwin had a major > revamp of the header files to align the feature macro handling closer to > the standards and ultimately to glibc as far as GNU extensions are > concerned. as a rule, I don't use changes that only work on "new" systems. =20 > When building on Cygwin, the tin configury sets -D_XOPEN_SOURCE=3D600. > However, tin.h contains this: >=20 > #ifndef __QNX__ > # ifdef HAVE_STRING_H > # include <string.h> > # else > # ifdef HAVE_STRINGS_H > # include <strings.h> > # endif /* HAVE_STRINGS_H */ > # endif /* HAVE_STRING_H */ > #else > # ifdef HAVE_STRING_H > # include <string.h> > # endif /* HAVE_STRING_H */ > # ifdef HAVE_STRINGS_H > # include <strings.h> > # endif /* HAVE_STRINGS_H */ > #endif /* !__QNX__ */ >=20 > So on non-__QNX__ systems, prefer to include string.h and only if > that's not available, include strings.h. >=20 > AFAICS this is incorrect. POSIX-1.2008 requires to include strings.h > to get strcasecmp/strncasecmp. It might be now, but when I added it, there were (possibly still are...) systems which would have conflicting definitions. =20 > Per the glibc man page the declarations are in string.h only on BSD > systems or in BSD compatiblity mode. You won't notice this on Linux, My Debian 7 manual page only shows strings.h The header files have the prototypes in both (but not ifdef'd to match your description). > because on Linux the aclocal.m4 function CF_XOPEN_SOURCE will set the > compatibility mode to -D_GNU_SOURCE, rather than -D_XOPEN_SOURCE=3D600. that's what works for Linux. =20 > I think the right thing to do is to change tin.h to always include > string.h and strings.h when they are available, i. e.: It's worth a try, to see what breaks :-) > The second problem I encountered is a missing declaration of vasprintf. > The reason here is that configure checks for the existence of vasprintf, > but then the tin headers don't define _GNU_SOURCE before using > vasprintf, even though vasprintf is a GNU extension. _GNU_SOURCE should be defined in the makefile (not in the headers). Defining that sort of thing in the header files has never worked reliably. =20 > I think the right thing to do here is to define _GNU_SOURCE as soon > as HAVE_VASPRINTF is defined. E. g: nope. If it's not defined by CF_XOPEN_SOURCE and/or CF_GNU_SOURCE, it's probably incorrect. > A Cygwin-specific workaround for both problems would be to change > CF_XOPEN_SOURCE to use the same mechanism to set _GNU_SOURCE as on > Linux etc, and to regenerate configure: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- aclocal.m4.ORIG 2016-08-09 15:35:17.983772427 +0200 > +++ aclocal.m4 2016-08-09 16:06:06.794538386 +0200 > @@ -5599,7 +5599,7 @@ case $host_os in > (aix[[4-7]]*) > cf_xopen_source=3D"-D_ALL_SOURCE" > ;; > -(cygwin|msys) > +(msys) > cf_XOPEN_SOURCE=3D600 > ;; > (darwin[[0-8]].*) > @@ -5627,7 +5627,7 @@ case $host_os in > cf_xopen_source=3D"-D_SGI_SOURCE" > cf_XOPEN_SOURCE=3D > ;; > -(linux*|gnu*|mint*|k*bsd*-gnu) > +(linux*|gnu*|mint*|k*bsd*-gnu|cygwin) > CF_GNU_SOURCE again - something to try :-) --=20 Thomas E. Dickey <[email protected]> http://invisible-island.net ftp://invisible-island.net --/9DWx/yDrRhgMJTb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAleqfgkACgkQcCNT4PfkjtufVQCguNxlA3s8UX3OZYVwE0hgU9iD XygAoNJJX9ub+ZEQcJzRj2j4hABrfe0J =d7eF -----END PGP SIGNATURE----- --/9DWx/yDrRhgMJTb-- --===============5739018474186460471== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KdGluLWRldiBt YWlsaW5nIGxpc3QKdGluLWRldkB0aW4ub3JnCmh0dHA6Ly9saXN0cy50aW4ub3JnL2NnaS1iaW4v bWFpbG1hbi9saXN0aW5mby90aW4tZGV2Cg== --===============5739018474186460471==--