aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/dgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/ppc/dgen.c')
-rw-r--r--sim/ppc/dgen.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/sim/ppc/dgen.c b/sim/ppc/dgen.c
index 2d6d3a3..9498e85 100644
--- a/sim/ppc/dgen.c
+++ b/sim/ppc/dgen.c
@@ -22,18 +22,32 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
#include <getopt.h>
#include <stdio.h>
#include <ctype.h>
#include <stdarg.h>
-#include <string.h>
+#include "config.h"
#include "misc.h"
#include "lf.h"
#include "table.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+
/****************************************************************/
int spreg_lookup_table = 1;