UNIX header files to Windows header files

Discussion in 'C Programming' started by anand.ba@gmail.com, May 1, 2006.

  1. Guest

    Hi,

    I need to port some C code from UNIX SGI to Windows (MS VC++ compiler).
    The following header files arent available in windows:
    #include <sys/param.h>
    #include <sys/ioctl.h>
    #include <sys/socket.h>
    #include <sys/socketvar.h>
    #include <netinet/in.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <netdb.h>
    #include <arpa/inet.h>


    Does anyone have any suggestions on how to get windows versions of
    these? Thanks!
    , May 1, 2006
    #1
    1. Advertising

  2. CBFalconer Guest

    wrote:
    >
    > I need to port some C code from UNIX SGI to Windows (MS VC++ compiler).
    > The following header files arent available in windows:
    > #include <sys/param.h>
    > #include <sys/ioctl.h>
    > #include <sys/socket.h>
    > #include <sys/socketvar.h>
    > #include <netinet/in.h>
    > #include <sys/types.h>
    > #include <sys/stat.h>
    > #include <netdb.h>
    > #include <arpa/inet.h>
    >
    > Does anyone have any suggestions on how to get windows versions of
    > these? Thanks!


    Those headers are not available in standard C, as discussed here.
    Your code is not portable. What you need is the appropriate
    libraries and their header files, not just the headers. For that
    go to a group covering your peculiar system. It may well have
    Microsoft in its name.

    You will probably be better off avoiding windoze entirely and
    switching to a linux system. Certainly cheaper and more reliable.

    --
    "If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers." - Keith Thompson
    More details at: <http://cfaj.freeshell.org/google/>
    Also see <http://www.safalra.com/special/googlegroupsreply/>
    CBFalconer, May 1, 2006
    #2
    1. Advertising

  3. Eric Sosman Guest

    wrote On 05/01/06 10:13,:
    > Hi,
    >
    > I need to port some C code from UNIX SGI to Windows (MS VC++ compiler).
    > The following header files arent available in windows:
    > #include <sys/param.h>
    > #include <sys/ioctl.h>
    > #include <sys/socket.h>
    > #include <sys/socketvar.h>
    > #include <netinet/in.h>
    > #include <sys/types.h>
    > #include <sys/stat.h>
    > #include <netdb.h>
    > #include <arpa/inet.h>


    Bad news, Anand: They're not available in Standard C,
    either.

    > Does anyone have any suggestions on how to get windows versions of
    > these? Thanks!


    Um, er, maybe somebody in a newsgroup that has "windows"
    or "microsoft" in its name might know? Naaah -- that's too
    obvious; try alt.rec.underwater.barbecue or something like it.

    --
    Eric Sosman, May 1, 2006
    #3
  4. In article <>,
    <> wrote:

    >I need to port some C code from UNIX SGI to Windows (MS VC++ compiler).
    >The following header files arent available in windows:
    > #include <sys/param.h>
    > #include <sys/ioctl.h>
    > #include <sys/socket.h>
    > #include <sys/socketvar.h>
    > #include <netinet/in.h>
    > #include <sys/types.h>
    > #include <sys/stat.h>
    > #include <netdb.h>
    > #include <arpa/inet.h>


    >Does anyone have any suggestions on how to get windows versions of
    >these? Thanks!


    You can't, not really.

    See however,

    http://en.wikipedia.org/wiki/Cygwin
    http://www.research.att.com/sw/tools/uwin/

    --
    Okay, buzzwords only. Two syllables, tops. -- Laurie Anderson
    Walter Roberson, May 1, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    12
    Views:
    1,618
    Dave Thompson
    Jan 10, 2005
  2. John Smith

    Header files included in header files

    John Smith, Jul 21, 2004, in forum: C Programming
    Replies:
    18
    Views:
    596
    Jack Klein
    Jul 24, 2004
  3. Replies:
    18
    Views:
    608
    Dave Thompson
    Jan 10, 2005
  4. mlt
    Replies:
    2
    Views:
    820
    Jean-Marc Bourguet
    Jan 31, 2009
  5. Robert Wallace

    my own perl "dos->unix"/"unix->dos"

    Robert Wallace, Jan 21, 2004, in forum: Perl Misc
    Replies:
    7
    Views:
    267
    Michele Dondi
    Jan 22, 2004
Loading...

Share This Page