From 3541446276268013d4d7aacf4daa9ad3f53991a8 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Fri, 20 Jan 2017 10:01:29 -0500 Subject: [PATCH] 'environ' isn't available as an external variable on Windows... fortunately, it's not really needed here anyway --- cgicheck.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cgicheck.cpp b/cgicheck.cpp index 7f1b4e5..4197689 100644 --- a/cgicheck.cpp +++ b/cgicheck.cpp @@ -32,7 +32,9 @@ int main( const int unused_argc, const char **unused_argv) int argc = 2; FILE *lock_file = fopen( "lock.txt", "w"); size_t bytes_written = 0; +#ifndef _WIN32 extern char **environ; +#endif extern int verbose; double search_radius = 2.; /* default to looking two degrees */ @@ -51,8 +53,10 @@ int main( const int unused_argc, const char **unused_argv) return( 0); } fprintf( lock_file, "We're in\n"); +#ifndef _WIN32 for( size_t i = 0; environ[i]; i++) fprintf( lock_file, "%s\n", environ[i]); +#endif if( !fgets( boundary, sizeof( boundary), stdin)) { printf( " No info read from stdin");