help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] RE: Mingwin Patch


From: Brent Fulgham
Subject: [Help-smalltalk] RE: Mingwin Patch
Date: Thu, 27 Feb 2003 17:42:50 -0800

> I'd like you to expand on what's needed from glib and what's winx and
> whether it's possible to extract code from them into GNU Smalltalk's
> tarball.

WinX is a piece of MingWin (I believe it's an add-on) that supplies
definitions and implementations of various POSIX things in terms of their
windows counterparts.

See below for details.

Thanks,

-Brent

1.  interp.c includes <winx/signalx.h> to get:

<<<< START OF FILE >>>>
#  define SIGHUP      -1
#  define SIGQUIT     -3
#  define SIGTRAP     -5
#  define SIGIOT      -6
#  define SIGEMT      -7
#  define SIGKILL     -9
#  define SIGBUS      -10
#  define SIGSYS      -12
#  define SIGPIPE     -13
#  define SIGALRM     -14
#  define SIGURG      -16
#  define SIGSTOP     -17
#  define SIGTSTP     -18
#  define SIGCONT     -19
#  define SIGCHLD     -20
#  define SIGTTIN     -21
#  define SIGTTOU     -22
#  define SIGIO       -23
#  define SIGXCPU     -24
#  define SIGXFSZ     -25
#  define SIGVTALRM   -26
#  define SIGPROF     -27
#  define SIGWINCH    -28
#  define SIGLOST     -29
#  define SIGUSR1     -30
#  define SIGUSR2     -32

#define SIG_SETMASK 0   /* set mask with sigprocmask() */
#define SIG_BLOCK 1     /* set of signals to block */
#define SIG_UNBLOCK 2   /* set of signals to, well, unblock */

/* POSIX sigsetjmp/siglongjmp macros */
#define sigjmp_buf jmp_buf

#define _SAVEMASK       _JBLEN
#define _SIGMASK        (_JBLEN+1)

/*
#define sigsetjmp(env, savemask) ((env)[_SAVEMASK] = savemask,\
               sigprocmask (SIG_SETMASK, 0, (sigset_t *) ((env) + _SIGMASK)),\
               setjmp (env))

#define siglongjmp(env, val) ((((env)[_SAVEMASK])?\
               sigprocmask (SIG_SETMASK, (sigset_t *) ((env) + _SIGMASK), 
0):0),\
               longjmp (env, val))

*/
#define sigsetjmp(env, savemask) (1)
#define siglongjmp(env, val) (1)

#ifndef sigemptyset
# define sigemptyset(s) (*(s) = 0)
#endif
#ifndef sigmask
# define sigmask(sig) (1 << ((sig) - 1))
#endif
/* # define sigaddset(s, sig) (*(s) |= sigmask (sig)) */

<<<<<< END OF FILE >>>>>>

2.  events.c include <winx/signalx.h> to get the same SIGUSR1 definition as
        the inter.c module.

3.  sysdep.c:
        (a) includes <winx/signalx.h> to get SIGUSR1, SIGUSR2, SIGCHLD, SIGIO,
                and SIGPIPE definitions.
        (b) includes <winx/sys/waitx.h> to get implementation of "fork", wait,
                pid, getpid.  I'm not sure how good these implementations are.

4.  tcp.c includes winsockx.h to get definitions for various POSIX error codes
in terms of the WINDOWS standard

<<<<<< START OF FILE >>>>>
/* Declarations of various socket errors: */

#define EWOULDBLOCK             WSAEWOULDBLOCK
#define EINPROGRESS             WSAEINPROGRESS
#define EALREADY                WSAEALREADY
#define ENOTSOCK                WSAENOTSOCK
#define EDESTADDRREQ            WSAEDESTADDRREQ
#define EMSGSIZE                WSAEMSGSIZE
#define EPROTOTYPE              WSAEPROTOTYPE
#define ENOPROTOOPT             WSAENOPROTOOPT
#define EPROTONOSUPPORT         WSAEPROTONOSUPPORT
#define ESOCKTNOSUPPORT         WSAESOCKTNOSUPPORT
#define EOPNOTSUPP              WSAEOPNOTSUPP
#define EPFNOSUPPORT            WSAEPFNOSUPPORT
#define EAFNOSUPPORT            WSAEAFNOSUPPORT
#define EADDRINUSE              WSAEADDRINUSE
#define EADDRNOTAVAIL           WSAEADDRNOTAVAIL
#define ENETDOWN                WSAENETDOWN
#define ENETUNREACH             WSAENETUNREACH
#define ENETRESET               WSAENETRESET
#define ECONNABORTED            WSAECONNABORTED
#define ECONNRESET              WSAECONNRESET
#define ENOBUFS                 WSAENOBUFS
#define EISCONN                 WSAEISCONN
#define ENOTCONN                WSAENOTCONN
#define ESHUTDOWN               WSAESHUTDOWN
#define ETOOMANYREFS            WSAETOOMANYREFS
#define ETIMEDOUT               WSAETIMEDOUT
#define ECONNREFUSED            WSAECONNREFUSED
#define ELOOP                   WSAELOOP
#define EHOSTDOWN               WSAEHOSTDOWN
#define EHOSTUNREACH            WSAEHOSTUNREACH
#define EPROCLIM                WSAEPROCLIM
#define EUSERS                  WSAEUSERS
#define EDQUOT                  WSAEDQUOT
#define ESTALE                  WSAESTALE
#define EREMOTE                 WSAEREMOTE

#ifndef socklen_t
#define socklen_t int
#endif
<<<<< END OF FILE >>>>>>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]