changeset 467:b8971268a804

minor changes to enable compilation on OpenBSD
author Gregg Reynolds <gar@kbui.org>
date Mon, 03 Sep 2007 09:57:18 -0500
parents 5c2dbb92ea80
children d3c99a19c0ce
files bcheck.c configure tcc.h
diffstat 3 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/bcheck.c	Tue Sep 04 00:26:12 2007 -0500
+++ b/bcheck.c	Mon Sep 03 09:57:18 2007 -0500
@@ -9,7 +9,9 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
-#if !defined(__FreeBSD__) && !defined(__DragonFly__)
+#if (!defined(__FreeBSD__) && \
+     !defined(__DragonFly__) && \
+     !defined(__OpenBSD__))
 #include <malloc.h>
 #endif
 
@@ -24,7 +26,11 @@
 
 #define HAVE_MEMALIGN
 
-#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__dietlibc__) || defined(__UCLIBC__)
+#if (defined(__FreeBSD__) || \
+     defined(__DragonFly__) || \
+     defined(__dietlibc__) || \
+     defined(__UCLIBC__) || \
+     defined(__OpenBSD__))
 #warning Bound checking not fully supported in this environment.
 #undef CONFIG_TCC_MALLOC_HOOKS
 #undef HAVE_MEMALIGN
--- a/configure	Tue Sep 04 00:26:12 2007 -0500
+++ b/configure	Mon Sep 03 09:57:18 2007 -0500
@@ -71,6 +71,9 @@
 DragonFly)
 noldl="yes"
 ;;
+OpenBSD)
+noldl="yes"
+;;
 *) ;;
 esac
 
--- a/tcc.h	Tue Sep 04 00:26:12 2007 -0500
+++ b/tcc.h	Mon Sep 03 09:57:18 2007 -0500
@@ -649,7 +649,10 @@
   #define strtof (float)strtod
   #define strtoll (long long)strtol
 #endif
-#elif defined(TCC_UCLIBC) || defined(__FreeBSD__) || defined(__DragonFly__)
+#elif (defined(TCC_UCLIBC) || \
+	defined(__FreeBSD__) || \
+	defined(__DragonFly__) || \
+	defined(__OpenBSD__))
 /* currently incorrect */
 static inline long double strtold(const char *nptr, char **endptr)
 {