diff options
author | Greg McGary <greg@mcgary.org> | 1997-04-18 06:34:23 +0000 |
---|---|---|
committer | Greg McGary <greg@mcgary.org> | 1997-04-18 06:34:23 +0000 |
commit | ab66bea0c326c2e18866ad37134dc91bf99c514a (patch) | |
tree | 54cc06ba3cd8ca1b5e8f72284438c5a2172ec5b6 /strxtra.h | |
parent | 809b665811bde40439d829d6193b278b26ae00ed (diff) | |
download | idutils-ab66bea0c326c2e18866ad37134dc91bf99c514a.tar.gz idutils-ab66bea0c326c2e18866ad37134dc91bf99c514a.tar.bz2 idutils-ab66bea0c326c2e18866ad37134dc91bf99c514a.zip |
imported from mkid-3.0.1r3_0_1
Diffstat (limited to 'strxtra.h')
-rw-r--r-- | strxtra.h | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -19,17 +19,21 @@ #ifndef _strxtra_h_ #define _strxtra_h_ -#ifdef HAVE_MALLOC_H +#if HAVE_STDLIB_H +#include <stdlib.h> +#else /* not HAVE_STDLIB_H */ +#if HAVE_MALLOC_H #include <malloc.h> -#endif +#endif /* HAVE_MALLOC_H */ +#endif /* not HAVE_STDLIB_H */ -#define strequ(s1, s2) (strcmp((s1), (s2)) == 0) -#define strnequ(s1, s2, n) (strncmp((s1), (s2), (n)) == 0) -#define strcaseequ(s1, s2) (strcasecmp((s1), (s2)) == 0) -#define strncaseequ(s1, s2, n) (strncasecmp((s1), (s2), (n)) == 0) +#define strequ(s1, s2) (strcmp ((s1), (s2)) == 0) +#define strnequ(s1, s2, n) (strncmp ((s1), (s2), (n)) == 0) +#define strcaseequ(s1, s2) (strcasecmp ((s1), (s2)) == 0) +#define strncaseequ(s1, s2, n) (strncasecmp ((s1), (s2), (n)) == 0) #ifndef HAVE_STRDUP -#define strdup(s) (strcpy(calloc(1, strlen(s)+1), (s))) +#define strdup(s) (strcpy (calloc (1, strlen (s) + 1), (s))) #endif -#define strndup(s, n) (strncpy(calloc(1, (n)+1), (s), (n))) +#define strndup(s, n) (strncpy (calloc (1, (n)+1), (s), (n))) #endif /* not _strxtra_h_ */ |