From: Steve Hay Date: Thu, 7 Jun 2007 13:49:04 +0000 (+0000) Subject: Stop VC++ from warning "'getenv' : inconsistent dll linkage. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4ee50d44aab4daa2990af918a17df7200b6e468c;p=p5sagit%2Fp5-mst-13.2.git Stop VC++ from warning "'getenv' : inconsistent dll linkage. dllexport assumed." when building with -DDEBUGGING by declaring getenv() with the same __declspec as in Microsoft's . 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 --- diff --git a/x2p/a2p.c b/x2p/a2p.c index 9d1d172..20e3227 100644 --- 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