gvanem / Watt-32

Watt-32 TCP/IP library and samples.
https://www.watt-32.net/
18 stars 8 forks source link

Made 'select_s' compile correctly when build defines 'W32_NO_8087' #91

Closed Lethja closed 10 months ago

Lethja commented 10 months ago

Fixed Watcom linking error when program makes use of select_s but W32_NO_8087 has been defined

Error! E2028: _w32_timeval_diff_ is an undefined reference

To replicate the problem: checkout adeb8e011d4499c2c4d876b1078e339add992461 and build WATTCPWL.LIB with #define USE_BSD_API then link the following test program against it

/* Compile with `OWCC -I INC LIB\WATTCPWL.LIB TEST.C` */

#include <stdio.h>
#include <stdlib.h>
#include <sys/select.h>

void foo(void) {
    /* Isn't run, just testing select() can be linked */
    select(0, NULL, NULL, NULL, NULL);
}

int main (int argc, char *argv[]) {
    puts("I compiled!");
    return 0;
}
gvanem commented 10 months ago

Merged into master. Thanks!