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]

Re: Ada merge of 2003-04-23 (cal.c) vs mingw32


 --- Laurent GUERBY <guerby@acm.org> wrote: > On Mon, 2003-05-12 at 01:05,
Danny Smith wrote:
> >  --- Laurent GUERBY <guerby@acm.org> wrote: > On Mon, 2003-05-12 at 00:00,
> > Danny Smith wrote:
> > Does that mean that one is expected to download the ACT tree in order to
> build
> > gnat for mingw?  
> 
> No, but I assume if you need to make some progress you can pick-up
> some code from there when it's not working.
> 
> >From the build status page, it looks like people haven't been reporting
> build status for mingw for GCC 3.2 (even C), I don't know if someone
> has successfully built 3.3 prereleases on mingw32 (did you try with
> 3.3?).
> 
Yes. Mingw builds 3.3 prerelease for C,C++,Ada,ObjC,Fortran.
I have not reported successful builds because my local tree contains a _lot_
of patches that have not yet made it into FSF tree or are only in trunk.


Ada patches have been submitted but AFAICT have not received serious
consideration.   I do not have ACATS installed locally and rely on Jerry van
Dyke to test.  He has reported very good results for 3.3 prerelease 20020102,
and has filed PR's (9129, 9130, 9132, 9135, 9136) for significant failures. 

I attach the mingw local Ada patchset for 3.3 for your convenience.  Hopefully,
some of these have made it into ACT tree or have been fixed otherwise.


> > Why isn't this file in the FSF repository?
> 
> A merge of the ACT repository into the FSF one is in progress,

Great.

> I guess nobody noticed this synchronisation problem before you.
> 
> Note that Ada tasking is currently broken on x86 because
> of a code generation problem introduced last week, see
> <http://gcc.gnu.org/ml/gcc/2003-05/msg00989.html>.
> 

I am building now with Richard Kenner's recent patch for this.

Danny 


http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.
2002-12-20  Danny Smith  <dannysmith@users.sourceforge.net>

	* ada/adaint.c (w32_epoch_offset): Define static const at file
	level.
	(win32_filetime): Replace offset with w32_epoch_offset. Use NULL
	rather than t_create, t_access in call to GetFileTime.
	(__gnat_file_time_name): Test for invalid file handle.
	(__gnat_set_filetime_name): Support win32 targets using
	w32api SetFileTime.


2002-03-10  Danny Smith  <dannysmith@users.sourceforge.net>

	* adaint.h (__gnat_plist_init): Add prototype for _WIN32.
	* adaint.c: Don't include sys/wait.h if __MINGW32__.
	(HAVE_DOS_BASED_FILE_SYSTEM): Define if necessary for
	__EMX__, MSDOS, and _WIN32.  Use throughout to check for
	DOS-based filesystems.
	(IS_DIR_SEPARATOR): Define if necessary. Use throughout for
	testing for dir separators.
	Include ctype.h for DOS-based filesystems.
	(__gnat_readlink): Let __CYGWIN__ use symlinks.
	(__gnat_symlink): Likewise.
	(__gnat_try_lock): Remove duplicate code for systems without link.
	(win32_filetime, win32_no_block_spawn, win32_wait, remove_handle,
	add_handle, plist_enter, plist_leave: Add prototypes.
	(plist_leave, remove_handle): Make static.
	Don't use POSIX permission masks if __MINGW32__.
	Remove duplicate include of windows.h.
	* cal.c: Include <winsock.h> if __MINGW32__.
	* cstreams.c (max_path_len): Use _MAX_PATH if _WIN32.
	Don't include sys/param.h for __MINGW32__.
	(__gnat_full_name): Move return statement outside of
	preprocessor switch.
	* init.c (__gnat_error_handler): Make __stdcall.
	Const-ify char* msg.
	*ada/sysdep.c: Include conio.h if __MINGW32__.
	(rts_get_hInstance): Cast return value of GetModuleHandleA
	to char *.
	* Make-lang.in (gnatdll$(exeext)): Add rule.  
	* Makefile.in: Use krunched filenames when building objects
	for gnatdll.exe.

Index: gcc/gcc/ada/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/Makefile.in,v
retrieving revision 1.36.4.4
diff -c -3 -p -r1.36.4.4 Makefile.in
*** gcc/gcc/ada/Makefile.in	27 Mar 2003 21:48:10 -0000	1.36.4.4
--- gcc/gcc/ada/Makefile.in	7 May 2003 02:15:19 -0000
*************** gnattools2: ../stamp-tools
*** 1610,1616 ****
  	  ../../gnatchop$(exeext) ../../gnat$(exeext) ../../gnatkr$(exeext) \
  	  ../../gnatls$(exeext) ../../gnatprep$(exeext) \
  	  ../../gnatpsta$(exeext) ../../gnatxref$(exeext) \
!           ../../gnatfind$(exeext) ../../gnatname$(exeext)
  
  # These tools are only built for the native version.
  gnattools3: ../stamp-tools
--- 1610,1617 ----
  	  ../../gnatchop$(exeext) ../../gnat$(exeext) ../../gnatkr$(exeext) \
  	  ../../gnatls$(exeext) ../../gnatprep$(exeext) \
  	  ../../gnatpsta$(exeext) ../../gnatxref$(exeext) \
!           ../../gnatfind$(exeext) ../../gnatname$(exeext) \
! 	  ../../gnatdll$(exeext)
  
  # These tools are only built for the native version.
  gnattools3: ../stamp-tools
*************** a-except.o  : a-except.adb a-except.ads
*** 2069,2083 ****
  s-assert.o  : s-assert.adb s-assert.ads a-except.ads
  	$(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 \
  	 $(ADA_INCLUDES) $<
  
  mdll.o : mdll.adb mdll.ads mdll-file.ads mdll-utl.ads
! 	$(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $< 
  
  mdll-fil.o : mdll-fil.adb mdll.ads mdll-fil.ads
! 	$(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $< 
  
  mdll-utl.o : mdll-utl.adb mdll.ads mdll-utl.ads sdefault.ads types.ads
! 	$(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $< 
    
  # force debugging information and no optimization on s-memory.o so that it 
  # is always possible to set breakpoint on __gnat_malloc and __gnat_free
--- 2070,2087 ----
  s-assert.o  : s-assert.adb s-assert.ads a-except.ads
  	$(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 \
  	 $(ADA_INCLUDES) $<
+ # -O2 triggers an error in verify_flow_info (when checks enabled)
+ g-spipat.o : g-spipat.adb g-spipat.ads
+ 	$(CC) -c $(ALL_ADAFLAGS) -O1 $(ADA_INCLUDES) $<
  
  mdll.o : mdll.adb mdll.ads mdll-file.ads mdll-utl.ads
! 	$(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $<
  
  mdll-fil.o : mdll-fil.adb mdll.ads mdll-fil.ads
! 	$(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $<
  
  mdll-utl.o : mdll-utl.adb mdll.ads mdll-utl.ads sdefault.ads types.ads
! 	$(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $<
    
  # force debugging information and no optimization on s-memory.o so that it 
  # is always possible to set breakpoint on __gnat_malloc and __gnat_free
Index: gcc/gcc/ada/adaint.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/adaint.c,v
retrieving revision 1.13
diff -c -3 -p -r1.13 adaint.c
*** gcc/gcc/ada/adaint.c	18 Nov 2002 14:39:46 -0000	1.13
--- gcc/gcc/ada/adaint.c	7 May 2003 02:15:30 -0000
***************
*** 65,73 ****
--- 65,81 ----
  #include "config.h"
  #include "system.h"
  #endif
+ 
+ #if !defined __MINGW32__
  #include <sys/wait.h>
+ #endif
  
  #if defined (__EMX__) || defined (MSDOS) || defined (_WIN32)
+ #include <process.h>
+ #include <ctype.h> /* for isalpha() */ 
+ #ifndef HAVE_DOS_BASED_FILE_SYSTEM
+ #define HAVE_DOS_BASED_FILE_SYSTEM 1
+ #endif
  #elif defined (VMS)
  
  /* Header files and definitions for __gnat_set_file_time_name.  */
*************** struct vstring
*** 116,128 ****
  #include <utime.h>
  #endif
  
- #if defined (__EMX__) || defined (MSDOS) || defined (_WIN32)
- #include <process.h>
- #endif
- 
  #if defined (_WIN32)
  #include <dir.h>
  #include <windows.h>
  #endif
  
  #include "adaint.h"
--- 124,140 ----
  #include <utime.h>
  #endif
  
  #if defined (_WIN32)
  #include <dir.h>
  #include <windows.h>
+ static time_t win32_filetime		PARAMS ((HANDLE));
+ static int win32_no_block_spawn 	PARAMS ((char *, char **));
+ static int win32_wait			PARAMS ((int *));
+ static void remove_handle 		PARAMS ((HANDLE));
+ static void add_handle 			PARAMS ((HANDLE));
+ static void plist_enter 		PARAMS ((void));
+ static void plist_leave			PARAMS ((void));
+ 
  #endif
  
  #include "adaint.h"
*************** struct vstring
*** 165,170 ****
--- 177,192 ----
  #define DIR_SEPARATOR '/'
  #endif
  
+ /* Define IS_DIR_SEPARATOR.  */
+ #ifndef IS_DIR_SEPARATOR
+ # ifndef DIR_SEPARATOR_2
+ #  define IS_DIR_SEPARATOR(CH) ((CH) == DIR_SEPARATOR)
+ # else /* DIR_SEPARATOR_2 */
+ #  define IS_DIR_SEPARATOR(CH) \
+ 	(((CH) == DIR_SEPARATOR) || ((CH) == DIR_SEPARATOR_2))
+ # endif /* DIR_SEPARATOR_2 */
+ #endif /* IS_DIR_SEPARATOR */
+ 
  char __gnat_dir_separator = DIR_SEPARATOR;
  
  char __gnat_path_separator = PATH_SEPARATOR;
*************** const int __gnat_vmsp = 0;
*** 216,222 ****
  /* This variable is used to export the maximum length of a path name to
     Ada code.  */
  
! #ifdef __EMX__
  int __gnat_max_path_len = _MAX_PATH;
  
  #elif defined (VMS)
--- 238,244 ----
  /* This variable is used to export the maximum length of a path name to
     Ada code.  */
  
! #if defined (__EMX__) || defined (__MINGW32__)
  int __gnat_max_path_len = _MAX_PATH;
  
  #elif defined (VMS)
*************** __gnat_to_gm_time (p_time, p_year, p_mon
*** 267,273 ****
  /* Place the contents of the symbolic link named PATH in the buffer BUF,
     which has size BUFSIZ.  If PATH is a symbolic link, then return the number
     of characters of its content in BUF.  Otherwise, return -1.  For Windows,
!    OS/2 and vxworks, always return -1.  */
  
  int    
  __gnat_readlink (path, buf, bufsiz)
--- 289,295 ----
  /* Place the contents of the symbolic link named PATH in the buffer BUF,
     which has size BUFSIZ.  If PATH is a symbolic link, then return the number
     of characters of its content in BUF.  Otherwise, return -1.  For Windows,
!    OS/2 and vxworks, always return -1.  CYGWIN supports symlinks.  */
  
  int    
  __gnat_readlink (path, buf, bufsiz)
*************** __gnat_readlink (path, buf, bufsiz)
*** 275,281 ****
       char *buf;
       size_t bufsiz;
  {
! #if defined (MSDOS) || defined (_WIN32) || defined (__EMX__)
    return -1;
  #elif defined (__INTERIX) || defined (VMS)
    return -1;
--- 297,303 ----
       char *buf;
       size_t bufsiz;
  {
! #if defined (HAVE_DOS_BASED_FILE_SYSTEM) && !defined (__CYGWIN__)
    return -1;
  #elif defined (__INTERIX) || defined (VMS)
    return -1;
*************** __gnat_symlink (oldpath, newpath)
*** 295,301 ****
       char *oldpath;
       char *newpath;
  {
! #if defined (MSDOS) || defined (_WIN32) || defined (__EMX__)
    return -1;
  #elif defined (__INTERIX) || defined (VMS)
    return -1;
--- 317,323 ----
       char *oldpath;
       char *newpath;
  {
! #if defined (HAVE_DOS_BASED_FILE_SYSTEM) && !defined (__CYGWIN__)
    return -1;
  #elif defined (__INTERIX) || defined (VMS)
    return -1;
*************** __gnat_symlink (oldpath, newpath)
*** 308,315 ****
  
  /* Try to lock a file, return 1 if success.  */
  
! #if defined (__vxworks) || defined (MSDOS) || defined (_WIN32)
! 
  /* Version that does not use link. */
  
  int
--- 330,338 ----
  
  /* Try to lock a file, return 1 if success.  */
  
! #if defined (HAVE_DOS_BASED_FILE_SYSTEM) \
!   || defined (__vxworks) || defined (VMS)
!              
  /* Version that does not use link. */
  
  int
*************** __gnat_try_lock (dir, file)
*** 329,356 ****
    return 1;
  }
  
- #elif defined (__EMX__) || defined (VMS)
- 
- /* More cases that do not use link; identical code, to solve too long
-    line problem ??? */
- 
- int
- __gnat_try_lock (dir, file)
-      char *dir;
-      char *file;
- {
-   char full_path[256];
-   int fd;
- 
-   sprintf (full_path, "%s%c%s", dir, DIR_SEPARATOR, file);
-   fd = open (full_path, O_CREAT | O_EXCL, 0600);
-   if (fd < 0)
-     return 0;
- 
-   close (fd);
-   return 1;
- }
- 
  #else
  
  /* Version using link(), more secure over NFS.  */
--- 352,357 ----
*************** __gnat_get_maximum_file_name_length ()
*** 408,414 ****
  int
  __gnat_get_file_names_case_sensitive ()
  {
! #if defined (__EMX__) || defined (MSDOS) || defined (VMS) || defined (WINNT)
    return 0;
  #else
    return 1;
--- 409,415 ----
  int
  __gnat_get_file_names_case_sensitive ()
  {
! #if defined (HAVE_DOS_BASED_FILE_SYSTEM) || defined (VMS)
    return 0;
  #else
    return 1;
*************** __gnat_get_file_names_case_sensitive ()
*** 418,424 ****
  char
  __gnat_get_default_identifier_character_set ()
  {
! #if defined (__EMX__) || defined (MSDOS)
    return 'p';
  #else
    return '1';
--- 419,425 ----
  char
  __gnat_get_default_identifier_character_set ()
  {
! #if defined (__EMX__) || defined (MSDOS) || defined (_WIN32)
    return 'p';
  #else
    return '1';
*************** __gnat_open_read (path, fmode)
*** 526,532 ****
    return fd < 0 ? -1 : fd;
  }
  
! #if defined (__EMX__)
  #define PERM (S_IREAD | S_IWRITE)
  #else
  #define PERM (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
--- 527,533 ----
    return fd < 0 ? -1 : fd;
  }
  
! #if defined (__EMX__) || defined (__MINGW32__)
  #define PERM (S_IREAD | S_IWRITE)
  #else
  #define PERM (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
*************** __gnat_readdir_is_thread_safe ()
*** 765,793 ****
     use fstat for this purpose as the DST modify the st_mtime field of the
     stat structure.  */
  
  static time_t
  win32_filetime (h)
       HANDLE h;
  {
-   BOOL res;
-   FILETIME t_create;
-   FILETIME t_access;
    FILETIME t_write;
    unsigned long long timestamp;
  
-   /* Number of seconds between <Jan 1st 1601> and <Jan 1st 1970>.  */
-   unsigned long long offset = 11644473600;
- 
    /* GetFileTime returns FILETIME data which are the number of 100 nanosecs
       since <Jan 1st 1601>. This function must return the number of seconds
       since <Jan 1st 1970>.  */
  
!   res = GetFileTime (h, &t_create, &t_access, &t_write);
  
    timestamp = (((long long) t_write.dwHighDateTime << 32) 
  	       + t_write.dwLowDateTime);
  
!   timestamp = timestamp / 10000000 - offset;
  
    return (time_t) timestamp;
  }
--- 766,791 ----
     use fstat for this purpose as the DST modify the st_mtime field of the
     stat structure.  */
  
+  /* Number of seconds between <Jan 1st 1601> and <Jan 1st 1970>.  */
+ static const unsigned long long w32_epoch_offset = 11644473600ULL;
+ 
  static time_t
  win32_filetime (h)
       HANDLE h;
  {
    FILETIME t_write;
    unsigned long long timestamp;
  
    /* GetFileTime returns FILETIME data which are the number of 100 nanosecs
       since <Jan 1st 1601>. This function must return the number of seconds
       since <Jan 1st 1970>.  */
  
!   GetFileTime (h, NULL, NULL, &t_write);
  
    timestamp = (((long long) t_write.dwHighDateTime << 32) 
  	       + t_write.dwLowDateTime);
  
!   timestamp = timestamp / 10000000 - w32_epoch_offset;
  
    return (time_t) timestamp;
  }
*************** __gnat_file_time_name (name)
*** 808,817 ****
    return ret;
  
  #elif defined (_WIN32)
    HANDLE h = CreateFile (name, GENERIC_READ, FILE_SHARE_READ, 0,
  			 OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
!   time_t ret = win32_filetime (h);
!   CloseHandle (h);
    return ret;
  #else
  
--- 806,819 ----
    return ret;
  
  #elif defined (_WIN32)
+   time_t ret = 0;
    HANDLE h = CreateFile (name, GENERIC_READ, FILE_SHARE_READ, 0,
  			 OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
!   if (h != INVALID_HANDLE_VALUE)
!     {
!       ret = win32_filetime (h);
!       CloseHandle (h);
!     }
    return ret;
  #else
  
*************** __gnat_set_file_time_name (name, time_st
*** 924,934 ****
       char *name;
       time_t time_stamp;
  {
! #if defined (__EMX__) || defined (MSDOS) || defined (_WIN32) \
!     || defined (__vxworks)
  
  /* Code to implement __gnat_set_file_time_name for these systems.  */
  
  #elif defined (VMS)
    struct FAB fab;
    struct NAM nam;
--- 926,956 ----
       char *name;
       time_t time_stamp;
  {
! #if defined (__EMX__) || defined (MSDOS)  || defined (__vxworks)
  
  /* Code to implement __gnat_set_file_time_name for these systems.  */
  
+ #elif defined (_WIN32)
+   union
+   {
+     FILETIME ft_time;
+     unsigned long long ull_time;
+   } time_u;
+   
+   HANDLE h  = CreateFile (name, GENERIC_WRITE, FILE_SHARE_WRITE, NULL,
+ 			  OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS,
+ 			  NULL);
+   if (h == INVALID_HANDLE_VALUE)
+     return;	
+   /* Add number of seconds between <Jan 1st 1601> and <Jan 1st 1970> */
+   time_u.ull_time = ((unsigned long long)time_stamp + w32_epoch_offset);
+   /*  Convert to 100 nanosecond units  */
+   time_u.ull_time *= 10000000ULL;
+ 
+   SetFileTime(h, NULL, NULL, &time_u.ft_time);
+   CloseHandle (h);
+   return;
+ 
  #elif defined (VMS)
    struct FAB fab;
    struct NAM nam;
*************** __gnat_set_env_value (name, value)
*** 1216,1225 ****
  #endif
  }
  
- #ifdef _WIN32
- #include <windows.h>
- #endif
- 
  /* Get the list of installed standard libraries from the
     HKEY_LOCAL_MACHINE\SOFTWARE\Ada Core Technologies\GNAT\Standard Libraries
     key.  */
--- 1238,1243 ----
*************** int    
*** 1323,1331 ****
  __gnat_is_absolute_path (name)
       char *name;
  {
!   return (*name == '/' || *name == DIR_SEPARATOR
! #if defined (__EMX__) || defined (MSDOS) || defined (WINNT)
!       || strlen (name) > 1 && isalpha (name[0]) && name[1] == ':'
  #endif
  	  );
  }
--- 1341,1349 ----
  __gnat_is_absolute_path (name)
       char *name;
  {
!    return ((*name == '/') || IS_DIR_SEPARATOR (*name)
! #if defined(HAVE_DOS_BASED_FILE_SYSTEM)
!        || (strlen (name) > 1 && isalpha (name [0]) && name [1] == ':')
  #endif
  	  );
  }
*************** add_handle (h)
*** 1487,1493 ****
    plist_leave();
  }
  
! void remove_handle (h)
       HANDLE h;
  {
    Process_List *pl, *prev;
--- 1505,1512 ----
    plist_leave();
  }
  
! static void
! remove_handle (h)
       HANDLE h;
  {
    Process_List *pl, *prev;
*************** __gnat_locate_regular_file (file_name, p
*** 1746,1757 ****
    char *ptr;
  
    /* Handle absolute pathnames.  */
!   for (ptr = file_name; *ptr && *ptr != '/' && *ptr != DIR_SEPARATOR; ptr++)
      ;
  
    if (*ptr != 0
! #if defined (__EMX__) || defined (MSDOS) || defined (WINNT)
!       || isalpha (file_name[0]) && file_name[1] == ':'
  #endif
       )
      {
--- 1765,1777 ----
    char *ptr;
  
    /* Handle absolute pathnames.  */
!   for (ptr = file_name;
!        *ptr && *ptr != '/' && !IS_DIR_SEPARATOR (*ptr); ptr++)
      ;
  
    if (*ptr != 0
! #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
!       || (isalpha (file_name [0]) && file_name [1] == ':')
  #endif
       )
      {
*************** __gnat_locate_regular_file (file_name, p
*** 1780,1786 ****
          *ptr++ = *path_val++;
  
        ptr--;
!       if (*ptr != '/' && *ptr != DIR_SEPARATOR)
          *++ptr = DIR_SEPARATOR;
  
        strcpy (++ptr, file_name);
--- 1800,1806 ----
          *ptr++ = *path_val++;
  
        ptr--;
!       if (*ptr != '/'  &&  !IS_DIR_SEPARATOR (*ptr))
          *++ptr = DIR_SEPARATOR;
  
        strcpy (++ptr, file_name);
Index: gcc/gcc/ada/adaint.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/adaint.h,v
retrieving revision 1.9.4.1
diff -c -3 -p -r1.9.4.1 adaint.h
*** gcc/gcc/ada/adaint.h	29 Jan 2003 17:40:47 -0000	1.9.4.1
--- gcc/gcc/ada/adaint.h	7 May 2003 02:15:30 -0000
*************** extern char   *__gnat_ttyname			   PARAM
*** 142,144 ****
--- 142,148 ----
  /* Portable definition of strdup, which is not available on all systems.  */
  #define xstrdup(S)  strcpy ((char *) malloc (strlen (S) + 1), S)
  #endif
+ 
+ #ifdef _WIN32
+ extern void 	__gnat_plist_init		  PARAMS ((void));
+ #endif
Index: gcc/gcc/ada/cstreams.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/cstreams.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 cstreams.c
*** gcc/gcc/ada/cstreams.c	23 Oct 2002 07:33:22 -0000	1.6
--- gcc/gcc/ada/cstreams.c	7 May 2003 02:15:30 -0000
***************
*** 67,73 ****
  #endif
  #endif
  
! /* The _IONBF value in CYGNUS or MINGW32 stdio.h is wrong.  */
  #if defined (WINNT) || defined (_WINNT)
  #undef _IONBF
  #define _IONBF 0004
--- 67,74 ----
  #endif
  #endif
  
! /* The _IONBF value in CYGNUS or MINGW32 stdio.h is wrong in
!    in old releases.  */
  #if defined (WINNT) || defined (_WINNT)
  #undef _IONBF
  #define _IONBF 0004
*************** __gnat_full_name (nam, buffer)
*** 204,211 ****
        strcpy (buffer, __gnat_to_host_file_spec (buffer));
      }
  
-   return buffer;
- 
  #else
    if (nam[0] != '/')
      {
--- 205,210 ----
*************** __gnat_full_name (nam, buffer)
*** 226,231 ****
    else
      strcpy (buffer, nam);
  
-   return buffer;
  #endif
  }
--- 225,232 ----
    else
      strcpy (buffer, nam);
  
  #endif
+ 
+   return buffer;
+ 
  }
Index: gcc/gcc/ada/expect.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/expect.c,v
retrieving revision 1.3
diff -c -3 -p -r1.3 expect.c
*** gcc/gcc/ada/expect.c	14 Mar 2002 10:59:16 -0000	1.3
--- gcc/gcc/ada/expect.c	7 May 2003 02:15:35 -0000
*************** __gnat_pipe (fd)
*** 88,95 ****
    HANDLE read, write;
  
    CreatePipe (&read, &write, NULL, 0);
!   fd[0]=_open_osfhandle (read, 0);
!   fd[1]=_open_osfhandle (write, 0);
    return 0;  /* always success */
  }
  
--- 88,95 ----
    HANDLE read, write;
  
    CreatePipe (&read, &write, NULL, 0);
!   fd[0]=_open_osfhandle ((long)read, 0);
!   fd[1]=_open_osfhandle ((long)write, 0);
    return 0;  /* always success */
  }
  
Index: gcc/gcc/ada/init.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/init.c,v
retrieving revision 1.11.4.1
diff -c -3 -p -r1.11.4.1 init.c
*** gcc/gcc/ada/init.c	29 Jan 2003 17:40:47 -0000	1.11.4.1
--- gcc/gcc/ada/init.c	7 May 2003 02:15:40 -0000
*************** __gnat_initialize ()
*** 685,701 ****
  #elif defined (__MINGW32__)
  #include <windows.h>
  
! static LONG __gnat_error_handler PARAMS ((PEXCEPTION_POINTERS));
  
  /* __gnat_initialize (mingw32).  */
  
! static LONG
  __gnat_error_handler (info)
       PEXCEPTION_POINTERS info;
  {
    static int recurse;
    struct Exception_Data *exception;
!   char *msg;
  
    switch (info->ExceptionRecord->ExceptionCode)
      {
--- 685,701 ----
  #elif defined (__MINGW32__)
  #include <windows.h>
  
! static LONG  CALLBACK __gnat_error_handler PARAMS ((PEXCEPTION_POINTERS));
  
  /* __gnat_initialize (mingw32).  */
  
! static LONG  CALLBACK
  __gnat_error_handler (info)
       PEXCEPTION_POINTERS info;
  {
    static int recurse;
    struct Exception_Data *exception;
!   const char *msg;
  
    switch (info->ExceptionRecord->ExceptionCode)
      {
Index: gcc/gcc/ada/sysdep.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/sysdep.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 sysdep.c
*** gcc/gcc/ada/sysdep.c	23 Oct 2002 07:33:34 -0000	1.9
--- gcc/gcc/ada/sysdep.c	7 May 2003 02:19:52 -0000
*************** __gnat_set_text_mode (handle)
*** 173,178 ****
--- 173,179 ----
  
  #ifdef __MINGW32__
  #include <windows.h>
+ #include <conio.h>  /* for getch(), kbhit() */
  
  /* Return the name of the tty.   Under windows there is no name for
     the tty, so this function, if connected to a tty, returns the generic name
*************** __gnat_ttyname (filedes)
*** 292,298 ****
  #endif
  
  #if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
!   || (defined (__osf__) && ! defined (__alpha_vxworks)) || defined (WINNT) \
    || defined (__MACHTEN__) || defined (hpux) || defined (_AIX) \
    || (defined (__svr4__) && defined (i386)) || defined (__Lynx__) \
    || defined (__CYGWIN__)
--- 293,299 ----
  #endif
  
  #if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
!   || (defined (__osf__) && ! defined (__alpha_vxworks)) \
    || defined (__MACHTEN__) || defined (hpux) || defined (_AIX) \
    || (defined (__svr4__) && defined (i386)) || defined (__Lynx__) \
    || defined (__CYGWIN__)
*************** int   rts_get_nShowCmd      PARAMS ((voi
*** 615,621 ****
  char *
  rts_get_hInstance () 
  { 
!   return GetModuleHandleA (0); 
  }
  
  char *
--- 616,622 ----
  char *
  rts_get_hInstance () 
  { 
!   return (char *) GetModuleHandleA (0); 
  }
  
  char *


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