This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Minor Ada front end fixes for MinGW
- From: "Aaron W. LaFramboise" <aaronavay62 at aaronwl dot com>
- To: Arnaud Charlet <charlet at ACT-Europe dot FR>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 15 Oct 2004 14:47:25 -0500
- Subject: Re: Minor Ada front end fixes for MinGW
- References: <4144EA19.4090306@aaronwl.com> <20040923111444.A20132@dublin.act-europe.fr> <416E2E61.2070500@aaronwl.com> <20041015131802.B12047@dublin.act-europe.fr>
Arnaud Charlet wrote:
>>Sorry, I don't have CVS access. Could you commit this for me? (I do
>>have a copyright assignment.)
>
> Could you verify your patch still applies properly and repost it ? Thanks.
Sorry for the confusion. Patch against today's mainline attached.
2004-10-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* adaint.c (__gnat_get_libraries_from_registry): Cast value
to LPBYTE.
(__gnat_portable_spawn): Remove const.
* mingw32.h (MAXPATHLEN): Check for previous definition.
Index: gcc/gcc/ada/adaint.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ada/adaint.c,v
retrieving revision 1.37
diff -c -3 -p -r1.37 adaint.c
*** gcc/gcc/ada/adaint.c 16 Aug 2004 09:00:19 -0000 1.37
--- gcc/gcc/ada/adaint.c 15 Oct 2004 19:41:47 -0000
*************** __gnat_get_libraries_from_registry (void
*** 1348,1354 ****
{
value_size = name_size = 256;
res = RegEnumValue (reg_key, index, name, &name_size, 0,
! &type, value, &value_size);
if (res == ERROR_SUCCESS && type == REG_SZ)
{
--- 1348,1354 ----
{
value_size = name_size = 256;
res = RegEnumValue (reg_key, index, name, &name_size, 0,
! &type, (LPBYTE)value, &value_size);
if (res == ERROR_SUCCESS && type == REG_SZ)
{
*************** __gnat_portable_spawn (char *args[])
*** 1551,1557 ****
#if defined (MSDOS) || defined (_WIN32)
/* args[0] must be quotes as it could contain a full pathname with spaces */
! const char *args_0 = args[0];
args[0] = (char *)xmalloc (strlen (args_0) + 3);
strcpy (args[0], "\"");
strcat (args[0], args_0);
--- 1551,1557 ----
#if defined (MSDOS) || defined (_WIN32)
/* args[0] must be quotes as it could contain a full pathname with spaces */
! char *args_0 = args[0];
args[0] = (char *)xmalloc (strlen (args_0) + 3);
strcpy (args[0], "\"");
strcat (args[0], args_0);
Index: gcc/gcc/ada/mingw32.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ada/mingw32.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 mingw32.h
*** gcc/gcc/ada/mingw32.h 22 Oct 2003 07:59:32 -0000 1.1
--- gcc/gcc/ada/mingw32.h 15 Oct 2004 19:41:48 -0000
***************
*** 49,54 ****
--- 49,56 ----
#define OLD_MINGW (!(STD_MINGW))
+ #ifndef MAXPATHLEN
#define MAXPATHLEN MAX_PATH
+ #endif
#endif /* _MINGW32_H */