From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32236 invoked by alias); 13 Sep 2004 00:29:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 32229 invoked from network); 13 Sep 2004 00:29:33 -0000 Received: from unknown (HELO mail.aaronwl.com) (68.228.0.128) by sourceware.org with SMTP; 13 Sep 2004 00:29:33 -0000 Received: from [70.182.5.200] (wsip-70-182-5-200.laft.cox-internet.com [70.182.5.200]) by mail.aaronwl.com (8.12.11/8.12.11) with ESMTP id i8D0TYba015042 for ; Mon, 13 Sep 2004 00:29:34 GMT Message-ID: <4144EA19.4090306@aaronwl.com> Date: Mon, 13 Sep 2004 01:14:00 -0000 From: "Aaron W. LaFramboise" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 MIME-Version: 1.0 To: Gcc Patch List Subject: Minor Ada front end fixes for MinGW X-Enigmail-Version: 0.84.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg01200.txt.bz2 The following three fixes eliminate some warnings in the Ada front end on MinGW: 1) value is a char, but Win32 BYTE is unsigned. 2) The args_0 temporary variable is const but shouldn't be because args is not. 3) MAXPATHLEN is defined by mingwrt. 2004-09-12 Aaron W. LaFramboise * 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 11 Sep 2004 23:47:39 -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 11 Sep 2004 23:47:41 -0000 *************** *** 49,54 **** --- 49,56 ---- #define OLD_MINGW (!(STD_MINGW)) + #ifndef MAXPATHLEN #define MAXPATHLEN MAX_PATH + #endif #endif /* _MINGW32_H */