$NetBSD: patch-am,v 1.3 2015/12/29 23:34:44 dholland Exp $

Use standard headers.
Don't redeclare getopt on a bunch more systems.

--- tool/ifdef/ifdef.cxx.orig	2005-05-06 08:49:09.000000000 +0000
+++ tool/ifdef/ifdef.cxx
@@ -13,6 +13,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
+#include <unistd.h>
 #include <string>
 #include <map>
 #ifndef __hpux
@@ -62,7 +63,7 @@ extern "C" {
 char *G__calc(char*);
 char *G__getexpr(char*);
 char *G__getandor(char*);
-#if !defined(__hpux) && !defined(__APPLE__) 
+#if !defined(__hpux) && !defined(__APPLE__) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
 char getopt(int argc,char **argv,char *optlist);
 #endif
 extern int optind;
