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.

(cherry picked from commit c062dbe)
  • Loading branch information
qris committed Dec 8, 2017
1 parent 493081a commit 5aa37b2
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 5aa37b2

Please sign in to comment.