Skip to content

Commit

Permalink
simplify string.h inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Jan 8, 2023
1 parent e3ba8f2 commit 5e5bb97
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/buildblock/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,7 @@ static enum
/* Value of POSIXLY_CORRECT environment variable. */
static char *posixly_correct;

#ifdef __GNU_LIBRARY__
/* We want to avoid inclusion of string.h with non-GNU libraries
because there are many ways it can cause trouble.
On some systems, it contains special magic macros that don't work
in GCC. */
# include <string.h>
# define my_index strchr
#else

# if HAVE_STRING_H || WIN32 /* Pete Wilson mod 7/28/02 */
# include <string.h>
# else
# include <strings.h>
# endif
#include <string.h>

/* Avoid depending on library functions or files
whose names are inconsistent. */
Expand Down

0 comments on commit 5e5bb97

Please sign in to comment.