diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-01 10:27:49 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-01 10:27:49 +0000 |
commit | 7d20685d15540e145a48cd22a0f998dabe5a497b (patch) | |
tree | 4cb0f919732a8780906712f099f44e28f97f78a4 /gcc/ada/env.c | |
parent | d49eb1e2de1025e9dd104991c8ad495ac76e86c4 (diff) | |
download | gcc-7d20685d15540e145a48cd22a0f998dabe5a497b.tar.gz |
2011-08-01 Robert Dewar <dewar@adacore.com>
* atree.ads: Minor comment fix.
* a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
a-witeio.ads, sem_prag.adb: Minor reformatting.
2011-08-01 Doug Rupp <rupp@adacore.com>
* env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
pointers. Use descrip.h header file for convenience. Add some
comments.
2011-08-01 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
(Freeze_All): Call Check_Aspect_At_End_Of_Declarations
* sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
New procedure.
(Check_Aspect_At_End_Of_Declarations): New procedure
(Analye_Aspect_Specification): Minor changes for above procedures
* sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
specification node as well.
2011-08-01 Pascal Obry <obry@adacore.com>
* adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
Windows files. Use GetFilesAttributes() in this case to check for file
existence instead of returning with an error code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177008 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/env.c')
-rw-r--r-- | gcc/ada/env.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/gcc/ada/env.c b/gcc/ada/env.c index acd928ce86b..8115442cc9a 100644 --- a/gcc/ada/env.c +++ b/gcc/ada/env.c @@ -50,6 +50,7 @@ extern "C" { #include <time.h> #ifdef VMS #include <unixio.h> +#include <vms/descrip.h> #endif #if defined (__MINGW32__) @@ -93,17 +94,11 @@ __gnat_getenv (char *name, int *len, char **value) static char *to_host_path_spec (char *); -struct descriptor_s -{ - unsigned short len, mbz; - __char_ptr32 adr; -}; - typedef struct _ile3 { unsigned short len, code; __char_ptr32 adr; - unsigned short *retlen_adr; + __char_ptr32 retlen_adr; } ile_s; #endif @@ -112,18 +107,19 @@ void __gnat_setenv (char *name, char *value) { #if defined (VMS) - struct descriptor_s name_desc; + struct dsc$descriptor_s name_desc; /* Put in JOB table for now, so that the project stuff at least works. */ - struct descriptor_s table_desc = {7, 0, "LNM$JOB"}; + $DESCRIPTOR (table_desc, "LNM$JOB"); char *host_pathspec = value; char *copy_pathspec; int num_dirs_in_pathspec = 1; char *ptr; long status; - name_desc.len = strlen (name); - name_desc.mbz = 0; - name_desc.adr = name; + name_desc.dsc$w_length = strlen (name); + name_desc.dsc$b_dtype = DSC$K_DTYPE_T; + name_desc.dsc$b_class = DSC$K_CLASS_S; + name_desc.dsc$a_pointer = name; /* ??? Danger, not 64bit safe. */ if (*host_pathspec == 0) /* deassign */ @@ -141,6 +137,7 @@ __gnat_setenv (char *name, char *value) { int i, status; + /* Alloca is guaranteed to be 32bit. */ ile_s *ile_array = alloca (sizeof (ile_s) * (num_dirs_in_pathspec + 1)); char *copy_pathspec = alloca (strlen (host_pathspec) + 1); char *curr, *next; |