openbsd-ports/lang/gcc/4.1/patches/patch-gcc_ada_adaint_c

22 lines
775 B
Plaintext

$OpenBSD: patch-gcc_ada_adaint_c,v 1.4 2005/09/11 22:04:41 espie Exp $
--- gcc/ada/adaint.c.orig Mon Sep 5 09:49:24 2005
+++ gcc/ada/adaint.c Mon Sep 12 00:01:23 2005
@@ -724,7 +724,7 @@ __gnat_open_new_temp (char *path, int fm
strcpy (path, "GNAT-XXXXXX");
-#if (defined (__FreeBSD__) || defined (linux)) && !defined (__vxworks)
+#if (defined (__FreeBSD__) || defined (__OpenBSD__) || defined (linux)) && !defined (__vxworks)
return mkstemp (path);
#elif defined (__Lynx__)
mktemp (path);
@@ -814,7 +814,7 @@ __gnat_tmp_name (char *tmp_filename)
free (pname);
}
-#elif defined (linux) || defined (__FreeBSD__)
+#elif defined (linux) || defined (__FreeBSD__) || defined(__OpenBSD__)
#define MAX_SAFE_PATH 1000
char *tmpdir = getenv ("TMPDIR");