Skip to content

Commit

Permalink
Only replace getopt on Windows, not any other platform
Browse files Browse the repository at this point in the history
The preprocessor test was wrong, causing this code to be built (and potentially
replace the system getopt/long) on all platforms. This made it impossible to
build with -Werror=writable-strings on Unix without modifying this file further
to fix its casting of static strings to mutable pointers.
  • Loading branch information
qris committed Dec 6, 2017
1 parent 0377d5b commit c062dbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/win32/getopt_long.cpp
Expand Up @@ -68,7 +68,7 @@

#include "box_getopt.h"

#ifdef REPLACE_GETOPT // until end of file
#if REPLACE_GETOPT // until end of file

int opterr = 1; /* if error message should be printed */
int optind = 1; /* index into parent argv vector */
Expand Down

0 comments on commit c062dbe

Please sign in to comment.