Show FEATURE_STRPTIME_SANITY_CHECKS on the show-status page
[privoxy.git] / cgisimple.c
index 7855fa0..79ec621 100644 (file)
@@ -1,4 +1,4 @@
-const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.117 2012/10/21 12:55:29 fabiankeil Exp $";
+const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.119 2013/01/25 21:52:02 david__schmidt Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
@@ -6,7 +6,7 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.117 2012/10/21 12:55:29 fabia
  * Purpose     :  Simple CGIs to get information about Privoxy's
  *                status.
  *
- * Copyright   :  Written by and Copyright (C) 2001-2011 the
+ * Copyright   :  Written by and Copyright (C) 2001-2013 the
  *                Privoxy team. http://www.privoxy.org/
  *
  *                Based on the Internet Junkbuster originally written
@@ -43,9 +43,9 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.117 2012/10/21 12:55:29 fabia
 #include <string.h>
 #include <assert.h>
 
-#ifdef HAVE_ACCESS
+#if defined (HAVE_ACCESS) && defined (HAVE_UNISTD_H)
 #include <unistd.h>
-#endif /* def HAVE_ACCESS */
+#endif /* def HAVE_ACCESS && HAVE_UNISTD_H */
 
 #include "project.h"
 #include "cgi.h"
@@ -1650,6 +1650,12 @@ static jb_err show_defines(struct map *exports)
    if (!err) err = map_conditional(exports, "FEATURE_STATISTICS", 0);
 #endif /* ndef FEATURE_STATISTICS */
 
+#ifdef FEATURE_STRPTIME_SANITY_CHECKS
+   if (!err) err = map_conditional(exports, "FEATURE_STRPTIME_SANITY_CHECKS", 1);
+#else /* ifndef FEATURE_STRPTIME_SANITY_CHECKS */
+   if (!err) err = map_conditional(exports, "FEATURE_STRPTIME_SANITY_CHECKS", 0);
+#endif /* ndef FEATURE_STRPTIME_SANITY_CHECKS */
+
 #ifdef FEATURE_TOGGLE
    if (!err) err = map_conditional(exports, "FEATURE_TOGGLE", 1);
 #else /* ifndef FEATURE_TOGGLE */