This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Darwin 7.0 and above having C99 functions


Since Darwin 7.0 and above have all the required C99 functions, we can define TARGET_C99_FUNCTIONS for that target. This patch does that. Later on this can
then depend on the Mac OS X version stuff that Matt Austern was adding.



OK? Bootstrapped on powerpc-apple-darwin7.0 and powerpc-apple-darwin6.2 with
no regressions on either.



Thanks, Andrew Pinski


ChangeLog: * config/darwin7.h: New file. * config.gcc (*-*-darwin*): Add darwin7.h if the version is greater than 6. * config/darwin.h (TARGET_C99_FUNCTIONS): Define.


Patch:


Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.438
diff -u -p -r1.438 config.gcc
--- config.gcc	3 Mar 2004 23:16:45 -0000	1.438
+++ config.gcc	4 Mar 2004 03:30:18 -0000
@@ -332,6 +332,10 @@ esac
 # Common parts for widely ported systems.
 case ${target} in
 *-*-darwin*)
+  case ${target} in
+    *-darwin[0-6]*) ;;
+    *) tm_file="${tm_file} darwin7.h" ;;
+  esac
   tm_file="${tm_file} darwin.h"
   tm_p_file="${tm_p_file} darwin-protos.h"
   tmake_file="t-darwin t-slibgcc-darwin"
Index: config/darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/darwin.h,v
retrieving revision 1.74
diff -u -p -r1.74 darwin.h
--- config/darwin.h	4 Mar 2004 00:18:53 -0000	1.74
+++ config/darwin.h	4 Mar 2004 03:30:18 -0000
@@ -846,4 +846,9 @@ void add_framework_path (char *);

#define TARGET_HAS_F_SETLKW

+/* Darwin before 7.0 does not have C99 functions.   */
+#ifndef TARGET_C99_FUNCTIONS
+#define TARGET_C99_FUNCTIONS 0
+#endif
+
 #endif /* CONFIG_DARWIN_H */

--- /dev/null	Wed Mar  3 19:30:46 2004
+++ config/darwin7.h	Wed Mar  3 19:23:01 2004
@@ -0,0 +1,2 @@
+#undef TARGET_C99_FUNCTIONS
+#define TARGET_C99_FUNCTIONS 1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]