diff -r 5b610781e787 -r 8e90da896548 UnixOperatingSystem.st --- a/UnixOperatingSystem.st Thu Apr 08 12:54:15 2004 +0200 +++ b/UnixOperatingSystem.st Thu Apr 08 14:47:30 2004 +0200 @@ -5409,26 +5409,26 @@ static int firstCall = 1; #if (defined(F_GETFL) && defined(F_SETFL) && defined(FASYNC)) || defined(SYSV4) -/* - * SIGIO/SIGPOLL - data available for I/O - * (used to wake up waiting processes) - */ -#ifdef SIGIO -# define THESIGNAL SIGIO -#else -# ifdef SIGPOLL -# define THESIGNAL SIGPOLL + /* + * SIGIO/SIGPOLL - data available for I/O + * (used to wake up waiting processes) + */ +# ifdef SIGIO +# define THESIGNAL SIGIO # else -# ifdef SIGURG -# define THESIGNAL SIGURG -# endif -# endif -#endif +# ifdef SIGPOLL +# define THESIGNAL SIGPOLL +# else +# ifdef SIGURG +# define THESIGNAL SIGURG +# endif +# endif +# endif if (__isSmallInteger(fd)) { if (firstCall) { -#ifdef HAS_SIGACTION - struct sigaction act = {0}; +# ifdef HAS_SIGACTION + struct sigaction act; /* * Do not add SA_RESTART here. A signal can cause a @@ -5441,18 +5441,18 @@ sigemptyset(&act.sa_mask); act.sa_handler = __signalIoInterrupt; sigaction(THESIGNAL, &act, 0); -#else -# ifdef HAS_SIGVEC +# else +# ifdef HAS_SIGVEC struct sigvec vec; vec.sv_flags = SV_INTERRUPT; sigemptyset(&vec.sv_mask); vec.sv_handler = __signalIoInterrupt; sigvec(THESIGNAL, &vec, NULL); -# else +# else signal(THESIGNAL, __signalIoInterrupt); -# endif -#endif +# endif /* SIGVEC */ +# endif /* SIGACTION */ firstCall = 0; } #undef THESIGNAL @@ -5473,25 +5473,25 @@ } # endif /*!SYSV4*/ -#if defined(F_SETOWN) || defined(FIOSETOWN) +# if defined(F_SETOWN) || defined(FIOSETOWN) { int pid; int ok; pid = getpid(); -# if defined(F_SETOWN) +# if defined(F_SETOWN) ok = fcntl(f, F_SETOWN, pid); /* printf("F_SETOWN returns %d (%d)\n", ret, errno); */ -# else +# else ok = ioctl(f, FIOSETOWN, &pid); /* printf("FIOSETOWN returns %d (%d)\n", ret, errno); */ -# endif +# endif if (ok < 0) { ret = ok; } } -#endif +# endif RETURN ( __MKUINT(ret) ); } #endif @@ -5678,7 +5678,7 @@ { #ifdef HAS_SIGACTION - struct sigaction act = {0}; + struct sigaction act; /* * Do not add SA_RESTART here. A signal can cause a @@ -5737,7 +5737,7 @@ if (firstCall) { # ifdef HAS_SIGACTION - struct sigaction act = {0}; + struct sigaction act; act.sa_flags = SA_SIGINFO; /* <- if you add more, remember dummys at the top */ sigemptyset(&act.sa_mask); @@ -11625,7 +11625,7 @@ #ifndef NO_SOCKET int sock; int ret; - struct sockaddr sockaddr = { AF_UNSPEC }; + struct sockaddr sockaddr; if (!__isSmallInteger(__INST(fd))) { error = @symbol(badFd); @@ -11637,6 +11637,7 @@ * (dis-) connect by connecting to AF_UNSPEC socket */ again: + sockaddr.sa_family = AF_UNSPEC; ret = connect(sock, &sockaddr, sizeof(sockaddr)); if (ret < 0) { switch(errno) { @@ -12327,7 +12328,7 @@ !UnixOperatingSystem class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.207 2004-03-31 09:56:38 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.208 2004-04-08 12:47:30 cg Exp $' ! ! UnixOperatingSystem initialize!