[ python-Bugs-1257687 ] Solaris 8 declares gethostname().

SourceForge.net noreply at sourceforge.net
Sun Aug 14 12:35:18 CEST 2005


Bugs item #1257687, was opened at 2005-08-12 11:00
Message generated for change (Comment added) made by deragon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1257687&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Hans Deragon (deragon)
Assigned to: Nobody/Anonymous (nobody)
Summary: Solaris 8 declares gethostname().

Initial Comment:
In portpy.h line 377, we find:

#ifdef SOLARIS
/* Unchecked */
extern int gethostname(char *, int);
#endif

Well, on Solaris 8, that function is declared in
/usr/include/unistd.h, thus a conflict.  In unistd.h,
there are a few #ifdef prior the declaration, so there
might be some situation where the function is not declared.

Of course, I cannot copy and paste the relevant section
of unistd.h because of copyright.  You might want to
ask Sun Microsystem a copy of this file to patch this
problem.

My work around was to comment the above code in portpy.h.

----------------------------------------------------------------------

>Comment By: Hans Deragon (deragon)
Date: 2005-08-14 06:35

Message:
Logged In: YES 
user_id=148726

When compiling beecrypt, it complained that gethostname()
was declared twice.  Seams that beecrypt was compiling
something for python and thus included pyport.h.  At the
same time, it was including unistd.h.  That cause beecrypt
compilation to halt with an error.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2005-08-13 10:05

Message:
Logged In: YES 
user_id=21627

What precise problem does this cause?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1257687&group_id=5470


More information about the Python-bugs-list mailing list