Fixed Header Files; Standard Libraries - Red Hat ENTERPRISE LINUX 3 - USING GCC Using Instructions

Using the gnu compiler collection (gcc)
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING GCC:
Table of Contents

Advertisement

Chapter 11. Known Causes of Trouble with GCC
token. Each such token must correspond to one token in C. Since this does not, GCC prints an error
message. Although it may appear obvious that what is meant is an operator and two values, the ISO
C standard specifically requires that this be treated as erroneous.
A preprocessing token is a preprocessing number if it begins with a digit and is followed by letters,
underscores, digits, periods and
C89 mode, the sequences
To make the above program fragment valid, place whitespace in front of the minus sign. This
whitespace will end the preprocessing number.

11.6. Fixed Header Files

GCC needs to install corrected versions of some system header files. This is because most target
systems have some header files that won't work with GCC unless they are changed. Some have bugs,
some are incompatible with ISO C, and some depend on special features of other compilers.
Installing GCC automatically creates and installs the fixed header files, by running a program called
(or for certain targets an alternative such as
fixincludes
to pay attention to this. But there are cases where it doesn't do the right thing automatically.
If you update the system's header files, such as by installing a new system version, the fixed header
files of GCC are not automatically updated. The easiest way to update them is to reinstall GCC. (If
you want to be clever, look in the makefile and you can find a shortcut.)
On some systems, in particular SunOS 4, header file directories contain machine-specific symbolic
links in certain places. This makes it possible to share most of the header files among hosts running
the same version of SunOS 4 on different machine models.
The programs that fix the header files do not understand this special way of using symbolic links;
therefore, the directory of fixed header files is good only for the machine model used to build it.
In SunOS 4, only programs that look inside the kernel will notice the difference between machine
models. Therefore, for most purposes, you need not be concerned about this.
It is possible to make separate sets of fixed header files for the different machine models, and
arrange a structure of symbolic links so as to use the proper set, but you'll have to do this by hand.
On Lynxos, GCC by default does not fix the header files. This is because bugs in the shell cause the
script to fail.
fixincludes
This means you will encounter problems due to bugs in the system header files. It may be no
comfort that they aren't GCC's fault, but it does mean that there's nothing for us to do about them.

11.7. Standard Libraries

GCC by itself attempts to be a conforming freestanding implementation. Chapter 3 Language Stan-
dards Supported by GCC, for details of what this means. Beyond the library facilities required of such
an implementation, the rest of the C library is supplied by the vendor of the operating system. If that C
library doesn't conform to the C standards, then your programs might get warnings (especially when
using
) that you don't expect.
-Wall
For example, the
sprintf
returns an
sprintf
match the Standard, but that would be wrong, since the function will still return
If you need a Standard compliant library, then you need to find one, as GCC does not provide one. The
GNU C library (called
GNU/Linux and HURD-based GNU systems; no recent version of it supports other systems, though
,
e+
e-
,
,
and
p+
p-
P+
function on SunOS 4.1.3 returns
. The
int
fixincludes
) provides ISO C, POSIX, BSD, SystemV and X/Open compatibility for
glibc
,
,
,
,
,
E+
E-
p+
p-
P+
cannot appear in preprocessing numbers.)
P-
fixinc.svr4
char *
program could make the prototype for this function
, or
character sequences. (In strict
P-
). Normally, you don't need
while the C standard says that
char *
243
.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 3 - USING GCC and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Enterprise linux 3

Table of Contents