[issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined

Richard PALO report at bugs.python.org
Wed Nov 13 05:36:22 CET 2013


Richard PALO added the comment:

Sure, attached is a simple test found on the internet, compiled with the following reproduces the problem:

richard at devzone:~/src$ /opt/local/gcc48/bin/g++ -o tp tp.cpp  -DSOLARIS -I/opt/local/include/python2.7 -L/opt/local/lib -lpython2.7 
In file included from /opt/local/include/python2.7/Python.h:58:0,
                 from tp.cpp:1:
/opt/local/include/python2.7/pyport.h:645:35: error: declaration of C function 'int gethostname(char*, int)' conflicts with
 extern int gethostname(char *, int);
                                   ^
In file included from /opt/local/include/python2.7/Python.h:44:0,
                 from tp.cpp:1:
/usr/include/unistd.h:351:12: error: previous declaration 'int gethostname(char*, uint_t)' here
 extern int gethostname(char *, size_t);

----------
Added file: http://bugs.python.org/file32592/tp.cpp

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19561>
_______________________________________


More information about the Python-bugs-list mailing list