🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #19962

inn-1.5.1sec2 snprintf confusion on Solaris 2.5, 2.5.1

#19962
From: Paul Eggert
Date: Thu, 31 Jul 1997 00:00
43 lines
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.

Technical Details
Message-ID: <5rr43f$89e$1@shade.twinsun.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <5rr43f$89e$1@shade.twinsun.com>
Subject: inn-1.5.1sec2 snprintf confusion on Solaris 2.5, 2.5.1
Date: Thu, 31 Jul 1997 00:00:00 +0000
From: eggert@twinsun.com (Paul Eggert)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 261225354
Organization: Twin Sun Inc, El Segundo, CA, USA
Newsgroups: news.software.nntp