Jump to content
Excelsior Forums

Using H2D on linux

Recommended Posts

I'm trying to use H2D to generate DEF files for a number of linux header files.  The primary one of interest at the moment is "socket.h".

I am using Fedora Core 2 as my linux distribution.  When I tell H2D to do it's job, it stops when it hits an error in sys/cdefs.h which seems to imply that H2D doesn't know the header file syntax properly.

The error I get is:

H2D v1.31.0 © 1996-1997 xTech Ltd.

File socket.h

Error [ sys/cdefs.h 122:19 ] ** Expected end of line

errors 1, warnings 0, lines 0.


Files 1, lines 0, errors 1, no warnings, time 0:0.

Now, at that line we have the following code:

#if __GNUC_PREREQ (2,97)

I have also had errors such as:

File /usr/include/linux/socket.h

Error [ linux/posix_types.h 37:26 ] ** Expected constant expression

where the offending line is:

       unsigned long fds_bits [__FDSET_LONGS];

and this seems to be an error where H2D doesn't cope with the constant expression __FDSET_LONGS defined by the previous lines:

#undef __NFDBITS

#define __NFDBITS       (8 * sizeof(unsigned long))


#undef __FD_SETSIZE

#define __FD_SETSIZE    1024


#undef __FDSET_LONGS


There are other messages, but these are fairly indicative.

Maybe I'm trying to convert the wrong socket API in the first place.

If anyone has a suggestion, Id love to see it.

Thanks in advance,

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now