Thread View: news.software.nntp
3 messages
3 total messages
Started by Paul Eggert
Thu, 31 Jul 1997 00:00
inn-1.5.1sec2 snprintf confusion on Solaris 2.5, 2.5.1
Author: Paul Eggert
Date: Thu, 31 Jul 1997 00:00
Date: Thu, 31 Jul 1997 00:00
43 lines
2209 bytes
2209 bytes
[I've also emailed this to inn-bugs.] config/config.dist is confused about snprintf on Solaris 2.5 and 2.5.1. These hosts have snprintf and vsnprintf, but their names are hidden with __ in front of them. Therefore, on those hosts, LIBSNPRINTF should be kept empty and HAVE_SNPRINTF should be kept DO, and the value of SNPRINTF_CFLAGS is irrelevant, since the snprintf library should not be built. On the other hand, one should add `-Dsnprintf=__snprintf -Dvsnprintf=__vsnprintf' to DEFS so that all the other programs link correctly; whether one is using GCC or cc is irrelevant as far as these options go. Here is a suggested patch to config.dist, to help remove some of the confusion. --- inn-1.5.1sec2/config/config.dist Wed Jul 30 23:23:01 1997 +++ inn-fixed/config/config.dist Thu Jul 31 22:06:04 1997 @@ -47,19 +47,13 @@ ## ## LIBSNPRINTF ../libsnprintf.a ## +## On Solaris 2.5 and 2.5.1, snprintf and vsnprintf are prefixed with __, +## so leave LIBSNPRINTF empty and append the following to DEFS: +## -Dsnprintf=__snprintf -Dvsnprintf=__vsnprintf ## Also see HAVE_SNPRINTF down below. #### =()<LIBSNPRINTF @<LIBSNPRINTF>@>()= LIBSNPRINTF ## What compiler flags do you need to build the snprintf library. -## -## On Solaris 2.5 and 2.5.1 (and maybe higher) with the Sun C compiler. -## you want -## -Xc -Dsun -D__svr4__ -DBad_float_h -## with gcc -## -Dsnprintf=__snprintf -Dvsnprintf=__vsnprintf -## (that's 2 underscores) is reported to work. -## -## #### =()<SNPRINTF_CFLAGS @<SNPRINTF_CFLAGS>@>()= SNPRINTF_CFLAGS ## If you need to link in other libraries, add them here.
Re: inn-1.5.1sec2 snprintf confusion on Solaris 2.5, 2.5.1
Author: USENET news
Date: Fri, 01 Aug 1997 00:00
Date: Fri, 01 Aug 1997 00:00
34 lines
2306 bytes
2306 bytes
In article <5rr43f$89e$1@shade.twinsun.com>,
Paul Eggert <eggert@twinsun.com> wrote:
>[I've also emailed this to inn-bugs.]
>
>config/config.dist is confused about snprintf on Solaris 2.5 and
>2.5.1. These hosts have snprintf and vsnprintf, but their names are
>hidden with __ in front of them. Therefore, on those hosts,
>LIBSNPRINTF should be kept empty and HAVE_SNPRINTF should be kept DO,
>and the value of SNPRINTF_CFLAGS is irrelevant, since the snprintf
>library should not be built. On the other hand, one should add
>`-Dsnprintf=__snprintf -Dvsnprintf=__vsnprintf' to DEFS so that all
>the other programs link correctly; whether one is using GCC or cc is
>irrelevant as far as these options go.
NO - not unless you also make it clear that they are undocumented,
unsupported (for customer use) versions of the routines, which will
*vanish* (they will not exist under those names; thereby breaking INN) in
Solaris 2.6 (to be replaced by offical, available to customers versions). If
people who understand the situation and the risks/consequences wish to use
the undocumented functions, fine.
Adding comments to config.dist encouraging people to do it and then wonder
some time in the future why an operating system upgrade breaks INN (and
blaming James, no doubt) seems like a very bad idea. This applies equally
whichever compiler you're using - I've already mailed James pointing out
the inadvisability of the current 1.5.1sec2 gcc instructions for Solaris 2.
John Line
--
Cambridge University Computing Service - USENET news manager. Usually John Line
newsmaster@ucs.cam.ac.uk (alias {newsmaster,news,usenet}@news.cam.ac.uk
Re: inn-1.5.1sec2 snprintf confusion on Solaris 2.5, 2.5.1
Author: Casper H.S. Dik - Network Securi...
Date: Fri, 01 Aug 1997 00:00
Date: Fri, 01 Aug 1997 00:00
26 lines
1700 bytes
1700 bytes
eggert@twinsun.com (Paul Eggert) writes: }config/config.dist is confused about snprintf on Solaris 2.5 and }2.5.1. These hosts have snprintf and vsnprintf, but their names are }hidden with __ in front of them. Therefore, on those hosts, }LIBSNPRINTF should be kept empty and HAVE_SNPRINTF should be kept DO, }and the value of SNPRINTF_CFLAGS is irrelevant, since the snprintf }library should not be built. On the other hand, one should add }`-Dsnprintf=__snprintf -Dvsnprintf=__vsnprintf' to DEFS so that all }the other programs link correctly; whether one is using GCC or cc is }irrelevant as far as these options go. But be aware that if you do this and then upgrade to Solaris 2.6, your program will fail with "ld.so: fatal: __snprintf: symbol not found" Casper -- Expressed in this posting are my opinions. They are in no way related to opinions held by my employer, Sun Microsystems. Statements on Sun products included here are not gospel and may be fiction rather than truth.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads