===================================================================
@@ -289,3 +289,7 @@
#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
===================================================================
@@ -20,6 +20,8 @@
/* 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);
===================================================================
@@ -21,19 +21,21 @@
#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);
===================================================================
@@ -466,3 +466,19 @@
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;
+}
===================================================================
@@ -157,3 +157,7 @@
/* 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