libc and header file problems - Minix

This is a discussion on libc and header file problems - Minix ; I discovered some problems with the Minix C library and header files while porting curl to Minix 3.1.2 using ACK on a 32-bit x86 system. A few functions found in libc were missing prototypes in header files, namely recv, send, ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: libc and header file problems

  1. libc and header file problems

    I discovered some problems with the Minix C library and header files while
    porting curl to Minix 3.1.2 using ACK on a 32-bit x86 system. A few
    functions found in libc were missing prototypes in header files,
    namely recv, send, and strtok_r. A few network functions were found
    in the header file , which is a bit of an odd place;
    the "standard" location on other systems (Linux, FreeBSD, Solaris)
    is .

    Finally, sigsetjmp is broken. Any attempt to use it will fail to link
    with an undefined symbol __longjmp. Looking through the source shows
    that, sure enough, _longjmp is called from siglongjmp but it's never
    defined. Here is a test program to demonstrate this problem:

    /*
    * This program fails to link on Minix 3.1.2 when compiled with ACK with:
    * cc -D_POSIX_SOURCE=1 -o jmptst jmptst.c
    * Undefined:
    * __longjmp
    */
    #include
    #include
    int main(void)
    {
    sigjmp_buf j;
    if (sigsetjmp(j, 0)) {
    printf("Got jump\n");
    return 0;
    }
    siglongjmp(j,1);
    printf("Error!\n");
    return 1;
    }

    The current daily builds of curl will now compile with gcc on Minix (as
    should 7.16.0 when it's released), but until the _longjmp problem is
    fixed, it won't on ACK.

    >>> Dan

    --
    http://www.MoveAnnouncer.com The web change of address service
    Let webmasters know that your web site has moved

  2. Re: libc and header file problems

    In article ,
    Dan Fandrich wrote:
    >I discovered some problems with the Minix C library and header files while
    >porting curl to Minix 3.1.2 using ACK on a 32-bit x86 system. A few
    >functions found in libc were missing prototypes in header files,
    >namely recv, send, and strtok_r. A few network functions were found
    >in the header file , which is a bit of an odd place;
    >the "standard" location on other systems (Linux, FreeBSD, Solaris)
    >is .


    The Open Group claims that the prototypes for send() and recv() have to be
    in

    The current version of Minix 3 (in CVS) has the prototypes and some fixes
    for send.

    There are many functions missing, and strtok_r is probably one of them.
    Port a BSD version and submit it as patch.

    >Finally, sigsetjmp is broken. Any attempt to use it will fail to link
    >with an undefined symbol __longjmp. Looking through the source shows
    >that, sure enough, _longjmp is called from siglongjmp but it's never
    >defined. Here is a test program to demonstrate this problem:


    I think this is also supposed to be fixed in the current version of Minix 3.
    For now, just define a function _longjmp somewhere that calls longjmp.

    >The current daily builds of curl will now compile with gcc on Minix (as
    >should 7.16.0 when it's released), but until the _longjmp problem is
    >fixed, it won't on ACK.


    Setjmp for gcc is broken in 3.1.2a.


    --
    That was it. Done. The faulty Monk was turned out into the desert where it
    could believe what it liked, including the idea that it had been hard done
    by. It was allowed to keep its horse, since horses were so cheap to make.
    -- Douglas Adams in Dirk Gently's Holistic Detective Agency

+ Reply to Thread