473,657 Members | 2,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Conflicting gethostname function definition on Solaris 9

Hello:

Building Python works fine. Now I am trying to build my own python
module on Solaris 9, but I'm getting the following conflict:

In file included from
/wrk/src/test/tools/local/include/python2.2/Python.h:62,
from elxml.cpp:20:
/wrk/src/test/tools/local/include/python2.2/pyport.h:333: declaration
of C function `int gethostname(cha r*, int)' conflicts with
/usr/include/unistd.h:274: previous declaration `int gethostname(cha r*, long
unsigned int)' here

Did I do something wrong?

Thanks

-John
Jul 18 '05 #1
2 2212
To work around this, I had to do two things:

1. not defined "SOLARIS"
2. put "python.h" first in the header file.

"John Ky" <jo***@aurema.c ommercial> wrote in message
news:10******** *******@cousin. sw.oz.au...
Hello:

Building Python works fine. Now I am trying to build my own python
module on Solaris 9, but I'm getting the following conflict:

In file included from
/wrk/src/test/tools/local/include/python2.2/Python.h:62,
from elxml.cpp:20:
/wrk/src/test/tools/local/include/python2.2/pyport.h:333: declaration
of C function `int gethostname(cha r*, int)' conflicts with
/usr/include/unistd.h:274: previous declaration `int gethostname(cha r*, long unsigned int)' here

Did I do something wrong?

Thanks

-John

Jul 18 '05 #2

"John Ky" <jo***@aurema.c ommercial> wrote in message
news:10******** *******@cousin. sw.oz.au...
To work around this, I had to do two things:

1. not defined "SOLARIS"
2. put "python.h" first in the header file.


Oops - I meant include "python.h" first before any other header
from my *.cpp file.

-John
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1844
by: BCC | last post by:
Given this test code: ..h file -------------- #include <iostream> #include <string> class CContainer { public: typedef std::string::size_type size_type; static const size_type npos2 = std::string::npos; };
2
6486
by: daniel | last post by:
Hi everyone, I'm trying to get this program compiled under Solaris. I have actually no idea about programming, sorry to bother you. Unfortunately Solaris don't use the function strsep() anymore: char *strsep(char **stringp, const char *delim);
0
1655
by: Jan | last post by:
While building PHP 4.4.0 on a fresh installed FreeBSD 5.4 I get the following error: www# /bin/sh /usr/home/c/console/toolscon/web/2/php-4.4.0/libtool --silent --preserve-dup-deps --mode=compile gcc -Imain/ -I/usr/home/c/console/toolscon/web/2/php-4.4.0/main/ -DPHP_ATOM_INC -I/usr/home/c/console/toolscon/web/2/php-4.4.0/include -I/usr/home/c/console/toolscon/web/2/php-4.4.0/main -I/usr/home/c/console/toolscon/web/2/php-4.4.0...
7
2610
by: Thiru | last post by:
I am writing an application that interacts with Oracle and Teradata. In order to create the executable, I need to link various Oracle and Teradata libraries. I found out that when I link the Oracle and Teradata libraries together, the Teradata API functions are not working properly. My assumption is that these libraries are sharing identical function names and parameter lists and hence the conflicts are causing the problem. Is my...
9
4005
by: daniel | last post by:
Hi everyone, I'm trying to get this program compiled under Solaris. Unfortunately I have little experience with C. Solaris doesn't use the function strsep() anymore: char *strsep(char **stringp, const char *delim);
8
9290
by: Lathe_Biosas | last post by:
Hi While compiling my application that needs "windows.h" there are some typedef redefinition errors redefinition at winnt.h( line 207) typedef void *HANDLE redefinition at windef.h( line 143) typedef unsigned char BYTE redefinition at windef.h( line 141) typedef unsigned long DWORD #define INVALID_HANDLE_VALUE -1 redefinition at winbase.h(55) #define
4
436
by: MSNews | last post by:
I get the following exception when calling Dns.GetHostName (from C#): An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in system.dll Additional information: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full This exception is then followed with the following exception: An unhandled exception of type 'System.TypeInitializationException'...
10
4305
by: 7stud | last post by:
Hi, I'm experimenting with a basic socket program(from a book), and both the client and server programs are on my computer. In both programs, I call socket.gethostname(), but I discovered that when I am connected to the internet, both the client and server hang and nothing happens. I discovered that the hostname of my computer automatically changes to that of my isp when I'm connected to the internet, and presumably the server program...
12
9120
by: Michael.Z | last post by:
Anyone who can help: Given a Table.h file I am writing a Table.c file. I keep getting the compile error: previous declaration of Table was here / conflicting types for I think the problem was the result of two pieces of code. First: typedef struct Table; /* in Table.c*/
0
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8820
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7314
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.