Fix popen pclose warnings compiling under wine

Fix i686-w64-mingw32-g++ compiler on linux warning:

In file included from Swig/swig.h:21:0,
                 from Swig/misc.c:14:
Swig/misc.c:1125:14: warning: ‘_popen’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 extern FILE *popen(const char *command, const char *type);
              ^
Swig/misc.c:1126:12: warning: ‘_pclose’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 extern int pclose(FILE *stream);
This commit is contained in:
William S Fulton 2017-01-28 01:22:06 +00:00
commit 25ac8f97f6

View file

@ -1117,19 +1117,17 @@ int Swig_scopename_check(const String *s) {
* *
* Printf(stderr,"%(command:sed 's/[a-z]/\U\\1/' <<<)s","hello") -> Hello * Printf(stderr,"%(command:sed 's/[a-z]/\U\\1/' <<<)s","hello") -> Hello
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
#if defined(HAVE_POPEN) #if defined(_MSC_VER)
# if defined(_MSC_VER) # define popen _popen
# define popen _popen # define pclose _pclose
# define pclose _pclose # if !defined(HAVE_POPEN)
# else # define HAVE_POPEN 1
extern FILE *popen(const char *command, const char *type);
extern int pclose(FILE *stream);
# endif # endif
#else #else
# if defined(_MSC_VER) # if !defined(_WIN32)
# define HAVE_POPEN 1 /* These Posix functions are not ISO C and so are not always defined in stdio.h */
# define popen _popen extern FILE *popen(const char *command, const char *type);
# define pclose _pclose extern int pclose(FILE *stream);
# endif # endif
#endif #endif