<string.h> vs <strings.h>
Leslie Mikesell
les at chinet.chi.il.us
Tue Oct 18 04:19:19 AEST 1988
In article <4354 at bsu-cs.UUCP> dhesi at bsu-cs.UUCP (Rahul Dhesi) writes:
>
>Writing portable code would be less frustrating if we had this
>preprocessor conditional:
>
>#if exists(<strings.h>)
>#include <strings.h>
>#else
>#include <string.h>
>#endif
Likewise for the functions available from the standard library. I know
ANSI is supposed to help with this but what about all the non-standard
extensions? Won't you want to use them if possible? Things like
Larry Wall's Configure script work but require a unix environment to
execute (extracting names from the library, etc.). Adding a conditional
like:
#if libfunction bcopy
is probably too much to ask, but how about a standard header file that
could be included that would have a #define for each non-standard item?
Les Mikesell
More information about the Comp.lang.c
mailing list