bug-gnulib
[Top][All Lists]
Advanced

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

Re: fpending issues on LSB


From: Nelson H. F. Beebe
Subject: Re: fpending issues on LSB
Date: Wed, 27 Sep 2006 07:05:59 -0600 (MDT)

Paul Eggert asks about the build of m4-1.4.7 with lsbcc on GNU/Linux
IA-32 (Fedora Core 5):

>> ...
>> Let's see what the bug is first.  It could just be an installation messup.
>> What is the output of this command?
>>
>> /opt/lsb/bin/lsbcc -E -DHAVE_CONFIG_H -I. -I.. close-stream.c
>> ...

I tried that, and found that when ../config.h contains

        #define HAVE_STDIO_EXT_H 1

the preprocessor produces

        __BEGIN_DECLS
        extern size_t __fbufsize (FILE *__fp) __THROW;
        ...
        __END_DECLS

and the lsbcc compiler chokes on those wrappers.

With gcc, the __BEGIN_DECLS and __END_DECLS macros do not appear in
the preprocessor output.  A grep of /usr/include/* shows many uses of
them, with these definitions:

        /usr/include/sys/cdefs.h:# define __BEGIN_DECLS extern "C" {
        /usr/include/sys/cdefs.h:# define __BEGIN_DECLS

The cdefs.h file is included by gcc via the path <stdio.h> ->
<features.h> -> <cdefs.h>.

However, lsbcc has many of its own header files, including <stdio.h>,
and it never includes <features.h>, and thus, never gets definitions
of __BEGIN_DECLS and __END_DECLS.

Because of the binary portability promised by the LSB API, I feel that
open source and free software developers should be testing their code
with LSB compilers, such as lsbcc and lsb++.  That is why I included
pointers to where they can be found in my problem report.  I have
started to use lsbcc in tests of my own packages, but I still have
some that won't build yet in LSB.

The LSB is described in this recent book:

@String{pub-PHPTR               = "Pren{\-}tice-Hall PTR"}
@String{pub-PHPTR:adr           = "Upper Saddle River, NJ 07458, USA"}

@Book{LSBT:2005:BAL,
  author =       "{Core Members of the Linux Standard Base Team}",
  title =        "Building applications with the {Linux Standard Base}",
  publisher =    pub-PHPTR,
  address =      pub-PHPTR:adr,
  pages =        "xxvi + 246",
  year =         "2005",
  ISBN =         "0-13-145695-4",
  ISBN-13 =      "978-0-13-145695-2",
  LCCN =         "QA76.76.O63 B8375 2004",
  bibdate =      "Thu Jun 22 05:22:21 2006",
  bibsource =    "z3950.loc.gov:7090/Voyager",
  note =         "Foreword by Theodore Ts'o.  Includes CD-ROM.",
  URL =          "http://www.freestandards.org/; http://www.lanana.org/;
                 http://www.linuxbase.org/;
                 http://www.linuxbase.org/test/registered.html;
                 http://www.phptr.com/title/0131456954";,
  acknowledgement = ack-nhfb,
  baseteam =     "Stuart Anderson and Mark Brown and Kevin Caunt and
                 Marvin Heffler and Andrew Josey and George Kraft IV and
                 Radhakrishnan Sethuraman and Matt Taggart and Kristin
                 Thomas and Theodore Ts'o and Mats Wichmann and Chris
                 Yeoh",
  subject =      "Linux; Operating systems (Computers); Application
                 software; Development",
}

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: address@hidden  -
- 155 S 1400 E RM 233                       address@hidden  address@hidden -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]