Skip to content

Commit 2d73bbf

Browse files
committed
Try to reduce compilation conflicts
1 parent 90e1a1e commit 2d73bbf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

util/util.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,18 @@ int dofmt( FmtPutchar func, void *funcarg, const char *fmt, va_ptr args );
4747
int lltoa_prec( unsigned long long x, char *buf, unsigned base, int prec );
4848

4949
// these are library functions on most systems
50+
// a few make defines for them in <string.h>, so check for defines
51+
// in order to reduce conflicts
52+
53+
#ifndef strdup
5054
extern char *strdup(const char *);
55+
#endif
56+
#ifndef strcasecmp
5157
extern int strcasecmp(const char *s1, const char *s2);
58+
#endif
59+
#ifndef strncasecmp
5260
extern int strncasecmp(const char *s1, const char *s2, size_t n);
61+
#endif
5362

5463
// make a string upper case (in place)
5564
char* strupr(char *origstr);

0 commit comments

Comments
 (0)