IRIX compatibility (yuck!)

master
leitner 20 years ago
parent 89761dc11e
commit c169ae9b4a

@ -11,6 +11,7 @@
but TCP? never heard of it")
remove even more warnings
64-bit cleanliness issue with auto-NULL-appending macros
IRIX compatibility (yuck!)
0.22:
uh, the scope_id detection #defined the wrong constant. libowfat

@ -7,6 +7,7 @@ int io_passfd(int64 sock,int64 fd) {
}
#else
#define _XOPEN_SOURCE
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>

@ -7,6 +7,7 @@ int64 io_receivefd(int64 sock) {
}
#else
#define _XOPEN_SOURCE
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>

@ -6,6 +6,10 @@
#include <time.h>
#include <stdlib.h>
#ifdef sgi
extern char** environ;
#endif
static int parsetime(const char*c,struct tm* x) {
unsigned long tmp;
c+=scan_ulong(c,&tmp); x->tm_hour=tmp;
@ -61,10 +65,18 @@ done:
*t=timegm(&x);
#else
{
#ifdef sgi
char** old=environ;
char** newenv={0};
environ=newenv;
*t=mktime(&x);
environ=old;
#else
char* old=getenv("TZ");
unsetenv("TZ");
*t=mktime(&x);
if (old) setenv("TZ",old,1);
#endif
}
#endif
return c-in;

@ -81,4 +81,8 @@ int main() {
#else
#error unsupported architecture
/* stupid fucking IRIX c99 does not signal #error via a non-zero exit
* code! ARGH! So insert a parse error */
#include rumpelstilzchen
)
#endif

Loading…
Cancel
Save