Help with C Header files among *NIX variants

Jerry Feldman Gerry.Feldman at compaq.com
Thu Jun 29 08:56:58 EDT 2000


This is not exactly what you are asking for, but all of the header files 
except for ip.h and icmp.h should be in the same place. The issue is not 
so much where the header files are, but what structures or prototypes 
you need from them. Most of the other header files are required by either 
the ISO C, POSIX, or XOPEN(UNix95,98)  standards. Most commercial 
platforms make their public header files self referential, so unless the 
code is a real Linux specific hack, it should port cleanly. Last year, I 
ported several com programs from Solaris to both Debian on Intel and 
Red Hat on Alpha. I found there was very little need for platform 
specificity. 

On 29 Jun 2000, at 7:49, Scott Ehrlich wrote:

> A coworker wrote a C program to perform port scans and system uptimes to
> ensure systems are up and running.
> 
> He wrote the program using Slackware Linux.   I may want to port some of
> the header stuff over to IRIX, SunOS 4.1.x, and Solaris.
> 
> Below are the header files.  What paths in the respective UNIX variants
> would need to be modified?  I hope not much more would need to be done.
> 
> #include <string.h>
> #include <unistd.h>
> #include <stdlib.h>
> #include <stdio.h>
> #include <sys/socket.h>
> #include <netinet/in.h>
> #include <arpa/inet.h>
> #include <netdb.h>
> #include <sys/time.h>
> #include <sys/types.h>
> #include <stdarg.h>
> #include <fcntl.h>
> #include <linux/ip.h>
> #include <linux/icmp.h>
> 
> Thanks in advance.
> 
> Scott
> 
> -
> Subcription/unsubscription/info requests: send e-mail with
> "subscribe", "unsubscribe", or "info" on the first line of the
> message body to discuss-request at blu.org (Subject line is ignored).


--
Jerry Feldman
Contractor, eInfrastructure Partner Engineering   
508-467-4315 http://www.testdrive.compaq.com/linux/

Compaq Computer Corp.
200 Forest Street MRO1-3/F1
Marlboro, Ma. 01752
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list