Stop VC++ from warning "'getenv' : inconsistent dll linkage.
Steve Hay [Thu, 7 Jun 2007 13:49:04 +0000 (13:49 +0000)]
dllexport assumed." when building with -DDEBUGGING by declaring
getenv() with the same __declspec as in Microsoft's <stdlib.h>.
MinGW/GCC is happy with that too, but Borland doesn't understand
_CRTIMP so don't bother for Borland since it doesn't warn anyway.

p4raw-id: //depot/perl@31350

x2p/a2p.c

index 9d1d172..20e3227 100644 (file)
--- a/x2p/a2p.c
+++ b/x2p/a2p.c
@@ -2181,7 +2181,11 @@ int yyparse (void);
 #define YYERROR goto yyerrlab
 
 #if YYDEBUG
+#  if defined(WIN32) && !defined(__BORLANDC__)
+EXTERN_C _CRTIMP char *getenv(const char *);
+#  else
 EXTERN_C char *getenv(const char *);
+#  endif
 #endif
 
 int