Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!nosc!ucsd!chem.ucsd.edu!tps
From: tps@chem.ucsd.edu (Tom Stockfisch)
Newsgroups: comp.lang.c
Subject: Re: Should I convert FORTRAN code to C?
Message-ID: <238@chem.ucsd.EDU>
Date: 13 Jun 88 22:47:32 GMT
References: <2742@utastro.UUCP> <225800036@uxe.cso.uiuc.edu> <522@white.gcm>
Reply-To: tps@chem.ucsd.edu (Tom Stockfisch)
Organization: Chemistry Dept, UC San Diego
Lines: 24

In article <522@white.gcm> dc@white.UUCP (Dave Caswell) writes:
>Is it true that some compilers generate inline code for strcpy, fabs
>and a host of other functions?  How does the compiler know that I will
>be linking with the standard library?

The scheme used by the compiler on our machine (Celerity 1260D) is to
enable inlining only if the library loader flag is given in the
command for *compiling* (not just linking).  E.g., to get in-line exp(),
fabs(), etc., compile as
	
	cc -c foopack.c -lm
	cc main.o foopack.o -lm

If you want to define your own fabs(), etc., then compile as

	cc -c foopack.c
	cc main.o foopack.o -lm

Considering the viability of this scheme (that does not require
reservation of any library names) and the undesirability of
ecologically disastrous name-space pollution, does anyone know
why the ANSI C committee chose to reserve all these names?
-- 

|| Tom Stockfisch, UCSD Chemistry	tps@chem.ucsd.edu