pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/51424: pkgtools/libnbcompat string.h header does not properly guard strdup definition



The following reply was made to PR pkg/51424; it has been noted by GNATS.

From: William Orr <will%worrbase.com@localhost>
To: gnats-bugs%NetBSD.org@localhost, joerg%NetBSD.org@localhost, gnats-admin%netbsd.org@localhost,
 pkgsrc-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/51424: pkgtools/libnbcompat string.h header does not properly
 guard strdup definition
Date: Sun, 21 Aug 2016 20:31:51 -0700

 On 8/20/16 4:30 AM, Joerg Sonnenberger wrote:
 > The following reply was made to PR pkg/51424; it has been noted by GNATS.
 > 
 > From: Joerg Sonnenberger <joerg%bec.de@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc: joerg%NetBSD.org@localhost, gnats-admin%netbsd.org@localhost, pkgsrc-bugs%netbsd.org@localhost,
 > 	will%worrbase.com@localhost
 > Subject: Re: pkg/51424: pkgtools/libnbcompat string.h header does not
 >  properly guard strdup definition
 > Date: Sat, 20 Aug 2016 13:29:21 +0200
 > 
 >  On Sat, Aug 20, 2016 at 12:10:00AM +0000, William Orr wrote:
 >  >  It's not that the configure test fails, it's that the configure test
 >  >  doesn't define HAVE_DECL_STRDUP - it defines HAVE_STRDUP. Normally, this
 >  >  would just shadow the declaration of strdup, but because strdup is a
 >  >  macro on this system, the preprocessor mangles the definition in
 >  >  nbcompat/string.h. When the header compilation check runs on
 >  >  nbcompat/string.h, this results in a compilation failure.
 >  
 >  This is not true. When the detection works correctly, it does define
 >  HAVE_DECL_STRDUP. This is *not* a test for a function, but for an actual
 >  usable prototype and function.
 >  
 >  Joerg
 >  
 > 
 
 Not sure what I'm missing. autoconf (when building pkgin) *does* set
 HAVE_STRDUP, but *does not* set HAVE_DECL_STRDUP. None of the other
 functions are guarded by a prefix. ./configure *does* throw errors when
 the function is guarded by the HAVE_DECL_STRDUP macro, since strdup on
 Fedora is a macro itself.
 
 Why is strdup the only function that is guarded by a macro prefixed with
 HAVE_DECL_ instead of HAVE_ ? Not super clear as to why on that front
 either.
 


Home | Main Index | Thread Index | Old Index