Skip to content

Commit c56fafc

Browse files
committed
Remove K&R-style getenv declaration from getopt.c
The old-style 'extern char *getenv ();' declaration conflicts with the standard library declaration. Since we include stdlib.h for WIN32, the proper declaration is already available. Made-with: Cursor
1 parent a081584 commit c56fafc

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

win32/getopt.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,7 @@ static char *posixly_correct;
222222
# endif
223223
#endif
224224

225-
/* Avoid depending on library functions or files
226-
whose names are inconsistent. */
227-
228-
#ifndef getenv
229-
extern char *getenv ();
230-
#endif
225+
/* getenv is declared in stdlib.h which we include for WIN32 */
231226

232227
static char *
233228
my_index (const char *str, int chr)

0 commit comments

Comments
 (0)