vms.c (VMS_CRTL_GLOBAL): Define.
authorTristan Gingold <gingold@adacore.com>
Fri, 16 Dec 2011 15:25:30 +0000 (15:25 +0000)
committerTristan Gingold <gingold@gcc.gnu.org>
Fri, 16 Dec 2011 15:25:30 +0000 (15:25 +0000)
2011-12-16  Tristan Gingold  <gingold@adacore.com>

* config/vms/vms.c (VMS_CRTL_GLOBAL): Define.
(vms_patch_builtins): Handle.
* config/vms/vms-crtlmap.map: Add an entry for environ.

From-SVN: r182405

gcc/ChangeLog
gcc/config/vms/vms-crtlmap.map
gcc/config/vms/vms.c

index 1b7a7434ab7345dc849e2634b7570aaac8b04f5f..7ed91d1495564e40ae5ccf4c5390e20541c0acf5 100644 (file)
@@ -1,3 +1,9 @@
+2011-12-16  Tristan Gingold  <gingold@adacore.com>
+
+       * config/vms/vms.c (VMS_CRTL_GLOBAL): Define.
+       (vms_patch_builtins): Handle.
+       * config/vms/vms-crtlmap.map: Add an entry for environ.
+
 2011-12-16  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/51557
index 4f2755e2c82dbeb3cb9537728853a84c3bba4f58..47520de03777861f71bcd1f406010c3be8edbfc5 100644 (file)
@@ -63,6 +63,7 @@ ctermid       64
 ctime
 dup
 dup2
+environ       GLOBAL
 exit
 exp           FLOAT
 fabs          FLOAT
index ab37f827f8349f054f419e25a290566997807684..63ca9319090fc09e417f13cc6623a4e5d96e615b 100644 (file)
@@ -45,6 +45,9 @@ along with GCC; see the file COPYING3.  If not see
 /* Prepend x before the name for printf like functions.  */
 #define VMS_CRTL_PRNTF (1 << 4)
 
+/* Prepend ga_ for global data.  */
+#define VMS_CRTL_GLOBAL (1 << 5)
+
 struct vms_crtl_name
 {
   /* The standard C name.  */
@@ -123,6 +126,12 @@ vms_patch_builtins (void)
           rlen += 9;
         }
 
+      if (n->flags & VMS_CRTL_GLOBAL)
+        {
+          memcpy (res + rlen, "ga_", 3);
+          rlen += 3;
+        }
+
       if (n->flags & VMS_CRTL_FLOAT)
         res[rlen++] = 't';