🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
7 messages
7 total messages Started by Frank 'Scruffy' Miller Wed, 30 Jul 1997 00:00
Compile options for gcc with SNPRINTF_CFLAGS for Solaris
#19927
Author: Frank 'Scruffy' Miller
Date: Wed, 30 Jul 1997 00:00
17 lines
1205 bytes
Was doing an upgrade from 1.5.1 to 1.5.1sec with standard working hours
to 1am when I ran into compile errors for gcc 2.7.2.2  for libsnprintf.a
for Solaris 2.5.1.  Has anyone the gcc compile flags out?  

I'll be able to touch this again tonight and will work it out then, but 
lazyness, err, knowledge sharing, has it's virtues.

Thanks, and back to Veratas madness.

-- 
----------------------------------------------------------------
Frank Miller                     |    frankm@master.cna.tek.com
Technical Computing Group Leader |    "Laugh while you can, 
Tektronix CNA Division           |    monkey-boy!!!!"

Re: Compile options for gcc with SNPRINTF_CFLAGS for Solaris
#19860
Author: Frank 'Scruffy' Miller
Date: Wed, 30 Jul 1997 00:00
37 lines
1806 bytes
In article <5rnpbu$hgq@solaris.cna.tek.com>,
Frank 'Scruffy' Miller <frankm@solaris.cna.tek.com> wrote:
>Was doing an upgrade from 1.5.1 to 1.5.1sec with standard working hours
>to 1am when I ran into compile errors for gcc 2.7.2.2  for libsnprintf.a
>for Solaris 2.5.1.  Has anyone the gcc compile flags out?  

Okay, was able to spend 15 this afternoon on this:

With gcc an Solris 2.5* on 1.5.1sec I used for SNPRINTF_CFLAGS:

	-Dsun -D__svr4__

I disagree with -DBad_float_h as recommended because float.h contains:

	DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP,
        FLT_RADIX, FLT_ROUNDS, and DBL_MAX.

Also, in vfprintf <math.h> is not needed as things are defined in 
the local xstdio.h.  So I changed vfprintf.c to only include
<math.h> if it is not a sun:

	#ifdef FLOATING_POINT
	#ifndef sun
	#include <math.h>
	#endif /*sun*/
	#include "floatio.h"

On to install, other issues are pressing! 

-- 
----------------------------------------------------------------
Frank Miller                     |    frankm@master.cna.tek.com
Technical Computing Group Leader |    "Laugh while you can, 
Tektronix CNA Division           |    monkey-boy!!!!"

Re: Compile options for gcc with SNPRINTF_CFLAGS for Solaris
#19993
Author: USENET news
Date: Thu, 31 Jul 1997 00:00
67 lines
3492 bytes
In article <5rold8$rrs@solaris.cna.tek.com>,
Frank 'Scruffy' Miller <frankm@solaris.cna.tek.com> wrote:
>In article <5rnpbu$hgq@solaris.cna.tek.com>,
>Frank 'Scruffy' Miller <frankm@solaris.cna.tek.com> wrote:
>>Was doing an upgrade from 1.5.1 to 1.5.1sec with standard working hours
>>to 1am when I ran into compile errors for gcc 2.7.2.2  for libsnprintf.a
>>for Solaris 2.5.1.  Has anyone the gcc compile flags out?  
>
>Okay, was able to spend 15 this afternoon on this:
>
>With gcc an Solris 2.5* on 1.5.1sec I used for SNPRINTF_CFLAGS:
>
>	-Dsun -D__svr4__
>
>I disagree with -DBad_float_h as recommended because float.h contains:
>
>	DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP,
>        FLT_RADIX, FLT_ROUNDS, and DBL_MAX.

The comments in config.data say "with the Sun C compiler" for a good reason;
the suggested SNPRINTF_CFLAGS there are for Solaris 2.5* with Sun's 
compiler, *not* with GCC.  

The comments from the Makefile in the newlog package (included in full in
INN 1.6b1/2, but with only the necessary bits extracted for 1.5.1sec) say

# Define BAD_FLOAT if you are unfortunate enough to not use
# gcc and thus don't have a proper float.h
#
BAD_FLOAT = -DBad_float_h

No indication of what is or may be inadequate with non-GCC-fixed headers...
Assuming the comment is correct (on all platforms...?), you should NOT 
use -DBad_float_h with GCC (whereas empirically it is essential on Solaris 
2.5[.1] with Sun's C compiler). [With the proviso that it may be misleading,
that comment from the original Makefile probably ought to be included in the 
INN config.data comments...]

From discussion of 1.6b1/2, the -Dsun -D__svr4__ should not be needed with
GCC (it defines them...) - but again, are needed with Sun's compiler because
the newlog code is reliant on GCC-specific features. (Apparently there are
equivalent symbols defined by *both* compilers, which could have been used
instead and would have avoided extra definitions being needed with either
compiler).

NB I have only used Sun's compilers, so I'm relying on untested information
for GCC.

>
>Also, in vfprintf <math.h> is not needed as things are defined in 
>the local xstdio.h.  So I changed vfprintf.c to only include
><math.h> if it is not a sun:

What xstdio.h is that? I don't see it either in Sun-supplied form or as a 
GCC-invented addition on my Solaris 2.5.1 system!

Overall, the snprintf stuff looks like it could have been much more 
portable, or at least need less system-specific special-casing. However, 
unless/until it is cleaned up, we just have to cope with its idiosyncracies.

                                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: Compile options for gcc with SNPRINTF_CFLAGS for Solaris
#19998
Author: Casper H.S. Dik - Network Securi...
Date: Thu, 31 Jul 1997 00:00
38 lines
2309 bytes
news@news.cam.ac.uk (USENET news) writes:

># Define BAD_FLOAT if you are unfortunate enough to not use
># gcc and thus don't have a proper float.h
>#
>BAD_FLOAT = -DBad_float_h

>No indication of what is or may be inadequate with non-GCC-fixed headers...
>Assuming the comment is correct (on all platforms...?), you should NOT 
>use -DBad_float_h with GCC (whereas empirically it is essential on Solaris 
>2.5[.1] with Sun's C compiler). [With the proviso that it may be misleading,
>that comment from the original Makefile probably ought to be included in the 
>INN config.data comments...]


Perhaps soemone can tell what's wrong with the float.h shipped with Solaris?
Or perhaps they've just writetn non-portabel code and blame it on someone
else?

BTW, gcc doesn't "fix" float.h, it generates a new one w/ enquire.
And gcc doesn't "fix" include files, it mostly adjusts them to its taste.
We'd be much better served with a gcc that learns to cope with vendor include
files, especially now that most vendors ship more reasonable ones.

(The main problem in the past was how ioctl's were defined and handled
by Reisser CPP vs cccp.  Now it seems that gcc is just quibbling over
whether or not a degree of standard non-conformance is allowed when __STDC__
is defined as 1)

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.

Re: Compile options for gcc with SNPRINTF_CFLAGS for Solaris
#20020
Author: Frank 'Scruffy' Miller
Date: Thu, 31 Jul 1997 00:00
53 lines
2463 bytes
In article <5rprp1$rqi@lyra.csx.cam.ac.uk>,
>John Line <newsmaster@ucs.cam.ac.uk> wrote:

>>Frank 'Scruffy' Miller <frankm@solaris.cna.tek.com> wrote:
>>
>>With gcc an Solris 2.5* on 1.5.1sec I used for SNPRINTF_CFLAGS:
>>
>>	-Dsun -D__svr4__
>>

>The comments from the Makefile in the newlog package (included in full in
>INN 1.6b1/2, but with only the necessary bits extracted for 1.5.1sec) say
>
># Define BAD_FLOAT if you are unfortunate enough to not use
># gcc and thus don't have a proper float.h
>#
>BAD_FLOAT = -DBad_float_h

Was just going by the snprintf distribution in the 1.5.1 release.  No
reference to the 'Bad_float_h' define.  Looks like I need to
look at the 1.6 relase when it goes out of beta.

>>
>>Also, in vfprintf <math.h> is not needed as things are defined in 
>>the local xstdio.h.  So I changed vfprintf.c to only include
>><math.h> if it is not a sun:

>
>What xstdio.h is that? I don't see it either in Sun-supplied form or as a 
>GCC-invented addition on my Solaris 2.5.1 system!
>

The 1.5.1 (haven't downloaded 1.6) utilzies a local xstdio.h in the 
snprintf distribution.

>Overall, the snprintf stuff looks like it could have been much more 
>portable, or at least need less system-specific special-casing. However, 
>unless/until it is cleaned up, we just have to cope with its idiosyncracies.
>
>                                John Line

No doubt!  I only seem to be able to work on innd at odd hours in the middle
of the night.  

Frank
-- 
----------------------------------------------------------------
Frank Miller                     |    frankm@master.cna.tek.com
Technical Computing Group Leader |    "Laugh while you can, 
Tektronix CNA Division           |    monkey-boy!!!!"

Re: Compile options for gcc with SNPRINTF_CFLAGS for Solaris
#20086
Author: Casper H.S. Dik - Network Securi...
Date: Fri, 01 Aug 1997 00:00
31 lines
2004 bytes
eggert@twinsun.com (Paul Eggert) writes:

>``Quibbling over'' isn't quite the right term.  Sun's compiler,
>which uses `#define __STDC__ 0' to mean ``I'm following the C Standard
>except with some extensions'', is a little, er, unusual.

I believe that "#define __STDC__ 1" as meaning "I'm standard conformant,
but I really don't give a damn about reserved namespaces" is WRONG.
I mean, what's the point of __STDC__ == 1 if you can't rely on
standard conformance?

>A better way of putting it is to say that Sun is out in left field here,
>and that GCC needs some way of bringing the header files back to the way
>that most other hosts do it.

It would be better for gcc to adapt to the host in question and
adapt the specs files to suit.

Gcc fixincludes breaks in one way in Solaris 2.6, so to say that
fixing the include files is the best way to do this is wrong; it's
the way most prone to breakage.

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.

Re: Compile options for gcc with SNPRINTF_CFLAGS for Solaris
#20137
Author: Fred Condo
Date: Sat, 02 Aug 1997 00:00
54 lines
2334 bytes
In article <5rnpbu$hgq@solaris.cna.tek.com>, frankm@solaris.cna.tek.com
(Frank 'Scruffy' Miller) wrote:

>Was doing an upgrade from 1.5.1 to 1.5.1sec with standard working hours
>to 1am when I ran into compile errors for gcc 2.7.2.2  for libsnprintf.a
>for Solaris 2.5.1.  Has anyone the gcc compile flags out?  
>
>I'll be able to touch this again tonight and will work it out then, but 
>lazyness, err, knowledge sharing, has it's virtues.
>
>Thanks, and back to Veratas madness.
>
>-- 
>----------------------------------------------------------------
>Frank Miller                     |    frankm@master.cna.tek.com
>Technical Computing Group Leader |    "Laugh while you can, 
>Tektronix CNA Division           |    monkey-boy!!!!"

Here is how I got libsnprintf.a to compile. I left the compile flags
blank, and made this change:

*** vfprintf.c-dist     Sat Aug  2 09:27:19 1997
--- vfprintf.c  Fri Aug  1 10:03:13 1997
***************
*** 68,74 ****
  #include "fvwrite.h"
  
  /* Define FLOATING_POINT to get floating point. */
! #define       FLOATING_POINT
  
  /*
   * Flush out all the vectors defined by the given uio,
--- 68,74 ----
  #include "fvwrite.h"
  
  /* Define FLOATING_POINT to get floating point. */
! #undef        FLOATING_POINT
  
  /*
   * Flush out all the vectors defined by the given uio,


This is on SunOS rain 5.5.1 Generic sun4u sparc SUNW,Ultra-1

gcc version is 2.7.2.1

-- 
http://www.lightside.net/~fred/ + net access + http://www.lightside.net/
"Attempts to control the use of encryption technology are wrong in
principle, unworkable in practice, and damaging to the long term economic
value of the information networks." - UK Labour Party

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