Browse Source

IRIX compatibility (yuck!)

master
Felix von Leitner 17 years ago
parent
commit
8b2036b21e
  1. 1
      CHANGES
  2. 1
      io/io_passfd.c
  3. 1
      io/io_receivefd.c
  4. 12
      scan/scan_httpdate.c
  5. 4
      trysendfile.c

1
CHANGES

@ -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

1
io/io_passfd.c

@ -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>

1
io/io_receivefd.c

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

12
scan/scan_httpdate.c

@ -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;

4
trysendfile.c

@ -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