[COMMITED] ada: Remove definition of MAXPATHLEN for ancient MinGW

Message ID 20220926091333.272502-1-poulhies@adacore.com
State Committed
Commit af61dc3ffd7c184571bcf1d773d97716cfe6093a
Headers
Series [COMMITED] ada: Remove definition of MAXPATHLEN for ancient MinGW |

Commit Message

Marc Poulhiès Sept. 26, 2022, 9:13 a.m. UTC
  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(-)
  

Patch

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 */