]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
vms.h (TARGET_OS_CPP_BUILTINS): Define __CRTL_VER and __VMS_VER.
authorTristan Gingold <gingold@adacore.com>
Fri, 16 Mar 2012 09:55:56 +0000 (09:55 +0000)
committerTristan Gingold <gingold@gcc.gnu.org>
Fri, 16 Mar 2012 09:55:56 +0000 (09:55 +0000)
2012-03-16  Tristan Gingold  <gingold@adacore.com>

* config/vms/vms.h (TARGET_OS_CPP_BUILTINS): Define
__CRTL_VER and __VMS_VER.
* config/vms/vms-protos.h: Declare vms_c_get_crtl_ver
and vms_c_get_vms_ver.
* config/vms/vms-c.c (vms_c_get_crtl_ver, vms_c_get_vms_ver): New
functions.
* config/alpha/vms.h (VMS_DEFAULT_CRTL_VER)
(VMS_DEFAULT_VMS_VER): Define.
* config/ia64/vms.h (VMS_DEFAULT_CRTL_VER)
(VMS_DEFAULT_VMS_VER): Define.

From-SVN: r185462

gcc/ChangeLog
gcc/config/alpha/vms.h
gcc/config/ia64/vms.h
gcc/config/vms/vms-c.c
gcc/config/vms/vms-protos.h
gcc/config/vms/vms.h

index 4fef9b17739babd1dc1dd676e6f8d0306cfbdd40..5ba4e523e6281b7cd94ac3eae0e832d8c6a51719 100644 (file)
@@ -1,3 +1,16 @@
+2012-03-16  Tristan Gingold  <gingold@adacore.com>
+
+       * config/vms/vms.h (TARGET_OS_CPP_BUILTINS): Define
+       __CRTL_VER and __VMS_VER.
+       * config/vms/vms-protos.h: Declare vms_c_get_crtl_ver
+       and vms_c_get_vms_ver.
+       * config/vms/vms-c.c (vms_c_get_crtl_ver, vms_c_get_vms_ver): New
+       functions.
+       * config/alpha/vms.h (VMS_DEFAULT_CRTL_VER)
+       (VMS_DEFAULT_VMS_VER): Define.
+       * config/ia64/vms.h (VMS_DEFAULT_CRTL_VER)
+       (VMS_DEFAULT_VMS_VER): Define.
+
 2012-03-16  Richard Guenther  <rguenther@suse.de>
 
        * tree-vect-loop.c (get_initial_def_for_induction): Use
index d99457741d15a0161fba0ebc58c064852935e7e3..7b4dd30fafd440c6e1d13353c514791107714d63 100644 (file)
@@ -289,3 +289,7 @@ do {                                                \
 
 #undef TARGET_VALID_POINTER_MODE
 #define TARGET_VALID_POINTER_MODE vms_valid_pointer_mode
+
+/* Default values for _CRTL_VER and _VMS_VER.  */
+#define VMS_DEFAULT_CRTL_VER 70320000
+#define VMS_DEFAULT_VMS_VER 70320000
index 0c02f8a2338b8d242bb47f3246205a6b69d8aa02..1908c47d585dc0eea88808a4ef5bcf9ca1ee68df 100644 (file)
@@ -157,3 +157,7 @@ STATIC func_ptr __CTOR_LIST__[1]                                             \
 /* IA64 VMS doesn't fully support COMDAT sections.  */
 
 #define SUPPORTS_ONE_ONLY 0
+
+/* Default values for _CRTL_VER and _VMS_VER.  */
+#define VMS_DEFAULT_CRTL_VER 80300000
+#define VMS_DEFAULT_VMS_VER 80300000
index 229846a0bf6b0df1c27adddce214d7254fa6772c..6f8a1cf613853fa1ff31ccd5996a47625a9e9ad5 100644 (file)
@@ -466,3 +466,19 @@ vms_c_common_override_options (void)
       break;
     }
 }
+
+/* The default value for _CRTL_VER macro.  */
+
+int
+vms_c_get_crtl_ver (void)
+{
+  return VMS_DEFAULT_CRTL_VER;
+}
+
+/* The default value for _VMS_VER macro.  */
+
+int
+vms_c_get_vms_ver (void)
+{
+  return VMS_DEFAULT_VMS_VER;
+}
index a8b9adad81c82edcfcd890bf9dd5b7618125e877..ff97c314c2a21627a80e635f391f52b19eb0a211 100644 (file)
@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3.  If not see
 /* vms-c.c  */
 extern void vms_c_register_pragma (void);
 extern void vms_c_common_override_options (void);
+extern int vms_c_get_crtl_ver (void);
+extern int vms_c_get_vms_ver (void);
 
 /* vms.c  */
 void vms_patch_builtins (void);
index e11b1bf4f175c53e092aa29bc25d937463451089..f2bc354d684114052ab29435b49416e7ff3cad50 100644 (file)
@@ -21,19 +21,21 @@ along with GCC; see the file COPYING3.  If not see
 #define TARGET_OBJECT_SUFFIX ".obj"
 #define TARGET_EXECUTABLE_SUFFIX ".exe"
 
-#define TARGET_OS_CPP_BUILTINS()                                \
-  do {                                                          \
-    builtin_define_std ("vms");                                 \
-    builtin_define_std ("VMS");                                 \
-    builtin_assert ("system=vms");                              \
-    SUBTARGET_OS_CPP_BUILTINS();                                \
-    builtin_define ("__int64=long long");                       \
-    if (flag_vms_pointer_size == VMS_POINTER_SIZE_32)           \
-      builtin_define ("__INITIAL_POINTER_SIZE=32");             \
-    else if (flag_vms_pointer_size == VMS_POINTER_SIZE_64)      \
-      builtin_define ("__INITIAL_POINTER_SIZE=64");             \
-    if (POINTER_SIZE == 64)                                     \
-      builtin_define ("__LONG_POINTERS=1");                     \
+#define TARGET_OS_CPP_BUILTINS()                                        \
+  do {                                                                  \
+    builtin_define_std ("vms");                                                 \
+    builtin_define_std ("VMS");                                                 \
+    builtin_assert ("system=vms");                                      \
+    SUBTARGET_OS_CPP_BUILTINS();                                        \
+    builtin_define ("__int64=long long");                               \
+    if (flag_vms_pointer_size == VMS_POINTER_SIZE_32)                   \
+      builtin_define ("__INITIAL_POINTER_SIZE=32");                     \
+    else if (flag_vms_pointer_size == VMS_POINTER_SIZE_64)              \
+      builtin_define ("__INITIAL_POINTER_SIZE=64");                     \
+    if (POINTER_SIZE == 64)                                             \
+      builtin_define ("__LONG_POINTERS=1");                             \
+    builtin_define_with_int_value ("__CRTL_VER", vms_c_get_crtl_ver ()); \
+    builtin_define_with_int_value ("__VMS_VER", vms_c_get_vms_ver ());   \
   } while (0)
 
 extern void vms_c_register_includes (const char *, const char *, int);