public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITED] ada: Remove definition of MAXPATHLEN for ancient MinGW
@ 2022-09-26  9:13 Marc Poulhiès
  0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2022-09-26  9:13 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

Modern MinGW defines MAXPATHLEN in sys/param.h, so better to use it
directly.

gcc/ada/

	* mingw32.h: Remove condition definition of MAXPATHLEN; the include
	directive for stdlib.h was most likely intended to provide the
	MAX_PATH.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/mingw32.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/gcc/ada/mingw32.h b/gcc/ada/mingw32.h
index bf8577bb1d4..a190d51076f 100644
--- a/gcc/ada/mingw32.h
+++ b/gcc/ada/mingw32.h
@@ -99,10 +99,4 @@ extern UINT __gnat_current_ccs_encoding;
 #define WS2S(str,wstr,len) strncpy(str,wstr,len)
 #endif
 
-#include <stdlib.h>
-
-#ifndef MAXPATHLEN
-#define MAXPATHLEN MAX_PATH
-#endif
-
 #endif /* _MINGW32_H */
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-26  9:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26  9:13 [COMMITED] ada: Remove definition of MAXPATHLEN for ancient MinGW Marc Poulhiès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).