Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 206 → Rev 207

/pkgnet/watt32/inc/sys/borlandc.err
0,0 → 1,113
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE IS GENERATED BY E:\NET\WATT\UTIL\BCC_ERR.EXE. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 47)
*/
 
#ifndef __BORLANDC__
#error This file is only for use by "__BORLANDC__"
#endif
 
#define ERRNO_VENDOR_VERSION "4.60"
 
#define EWOULDBLOCK 48
#define EDOM 33
#define ERANGE 34
#define E2BIG 20
#define EACCES 5
#define EAGAIN 42
#define EBADF 6
#define EBUSY 44
#define ECHILD 24
#define EDEADLK 49
#define EEXIST 35
#define EFAULT 14
#define EFBIG 27
#define EINTR 39
#define EINVAL 19
#define EIO 40
#define EISDIR 46
#define EMFILE 4
#define EMLINK 31
#define ENAMETOOLONG 50
#define ENFILE 23
#define ENODEV 15
#define ENOENT 2
#define ENOEXEC 21
#define ENOLCK 51
#define ENOMEM 8
#define ENOSPC 28
#define ENOSYS 52
#define ENOTDIR 45
#define ENOTEMPTY 53
#define ENOTTY 25
#define ENXIO 41
#define EPERM 37
#define EPIPE 32
#define EROFS 30
#define ESPIPE 29
#define ESRCH 38
#define EXDEV 22
#define ENMFILE 18
#define EINPROGRESS 54
#define EALREADY 55
#define ENOTSOCK 56
#define EDESTADDRREQ 57
#define EMSGSIZE 58
#define EPROTOTYPE 59
#define ENOPROTOOPT 60
#define EPROTONOSUPPORT 61
#define ESOCKTNOSUPPORT 62
#define EOPNOTSUPP 63
#define EPFNOSUPPORT 64
#define EAFNOSUPPORT 65
#define EADDRINUSE 66
#define EADDRNOTAVAIL 67
#define ENETDOWN 68
#define ENETUNREACH 69
#define ENETRESET 70
#define ECONNABORTED 71
#define ECONNRESET 72
#define ENOBUFS 73
#define EISCONN 74
#define ENOTCONN 75
#define ESHUTDOWN 76
#define ETIMEDOUT 77
#define ECONNREFUSED 78
#define EHOSTDOWN 79
#define EHOSTUNREACH 80
#define ESTALE 81
#define EREMOTE 82
#define EBADRPC 83
#define ERPCMISMATCH 84
#define EPROGUNAVAIL 85
#define EPROGMISMATCH 86
#define EPROCUNAVAIL 87
#define EILSEQ 88
#define EINVFNC 1
#define ENOPATH 3
#define ECONTR 7
#define EINVMEM 9
#define EINVENV 10
#define EINVFMT 11
#define EINVACC 12
#define EINVDAT 13
#define EDEADLOCK 36
#define ECURDIR 16
#define ENOTSAM 17
#define ETXTBSY 26
#define ENOTBLK 43
#define EUCLEAN 47
#define ETOOMANYREFS 89
#define ELOOP 90
#define EPROCLIM 91
#define EUSERS 92
#define EDQUOT 93
#define EVDBAD 94
#define ENORMTWD 95
#define EOVERFLOW 96
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/cdefs.h
0,0 → 1,257
/*!\file sys/cdefs.h
*
* C-compiler definitions.
*/
 
/*
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Berkeley Software Design, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)cdefs.h 8.7 (Berkeley) 1/21/94
*/
 
#ifndef __SYS_CDEFS_H
#define __SYS_CDEFS_H
 
#if defined(__DJGPP__) && !defined(djgpp_cdefs_incl)
#include "/dev/env/DJDIR/include/sys/cdefs.h"
#define djgpp_cdefs_incl
#endif
 
#ifdef __cplusplus
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS }
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif
 
#ifndef W32_NAMESPACE
#define W32_NAMESPACE(x) _w32_ ## x
#endif
 
#if defined(__CCDL__)
#define cdecl _cdecl
 
#elif defined(__MINGW32__) && !defined(cdecl)
#define cdecl __attribute__((__cdecl__))
 
#elif defined(_MSC_VER) || defined(__POCC__)
#undef cdecl
#if (_MSC_VER <= 600)
#define cdecl _cdecl
#undef __STDC__
#define __STDC__ 1
#else
#define cdecl __cdecl
#endif
#define NO_ANSI_KEYWORDS
 
#elif defined(__DMC__)
#define NO_UNDERSCORE __syscall
/* e.g. int NO_UNDERSCORE foo (void); */
#endif
 
#ifndef cdecl
#define cdecl
#endif
 
#if defined(_MSC_VER) && !defined(WIN32) && !defined(_WIN32)
/*
* MS's Quick-C/Visual-C (for DOS) insists that signal-handlers, atexit
* functions and var-arg functions must be defined cdecl.
* This is only an issue if a program is using 'fastcall' globally
* (cl option /Gr).
* On Win32 this isn't an issue since WATT-32.DLL cannot be built
* as 'fastcall' anyway.
*/
#undef MS_CDECL
#define MS_CDECL cdecl
#else
#define MS_CDECL
#endif
 
 
struct mbuf {
struct mbuf *next; /* Links mbufs belonging to single packets */
struct mbuf *anext; /* Links packets on queues */
unsigned size; /* Size of associated data buffer */
int refcnt; /* Reference count */
struct mbuf *dup; /* Pointer to duplicated mbuf */
char *data; /* Active working pointers */
unsigned cnt;
};
 
 
/*
* The __CONCAT macro is used to concatenate parts of symbol names, e.g.
* with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
* The __CONCAT macro is a bit tricky -- make sure you don't put spaces
* in between its arguments. __CONCAT can also concatenate double-quoted
* strings produced by the __STRING macro, but this only works with ANSI C.
*/
#if (defined(__STDC__) && __STDC__) || defined(__cplusplus) || defined(__TURBOC__)
#undef __P
#define __P(protos) protos /* full-blown ANSI C */
#define __CONCAT(x,y) x ## y
#define __STRING(x) #x
 
#define __const const /* define reserved names to standard */
#define __signed signed
#define __volatile volatile
#if defined(__cplusplus)
#define __inline inline /* convert to C++ keyword */
#elif !defined(__GNUC__) && !defined(_MSC_VER) && !defined(__WATCOMC__)
#define __inline /* delete GCC/MSC/Watcom keyword */
#endif
 
#else
#define __P(protos) () /* traditional C preprocessor */
#define __CONCAT(x,y) x/**/y
#define __STRING(x) "x"
 
#if !defined(__GNUC__) && !defined(_MSC_VER) && !defined(__WATCOMC__)
#define __inline
#endif
 
#if !defined(__GNUC__)
#define __const /* delete pseudo-ANSI C keywords */
#define __signed
#define __volatile
 
/*
* In non-ANSI C environments, new programs will want ANSI-only C keywords
* deleted from the program and old programs will want them left alone.
* When using a compiler other than gcc, programs using the ANSI C keywords
* const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
* When using "gcc -traditional", we assume that this is the intent; if
* __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
*/
#if !defined(NO_ANSI_KEYWORDS)
#define const /* delete ANSI C keywords */
#define inline
#define signed
#define volatile
#endif
#endif /* !__GNUC__ */
#endif /* !C++ */
 
/*
* GCC1 and some versions of GCC2 declare dead (non-returning) and
* pure (no side effects) functions using "volatile" and "const";
* unfortunately, these then cause warnings under "-ansi -pedantic".
* GCC2 uses a new, peculiar __attribute__((attrs)) style. All of
* these work for GNU C++ (modulo a slight glitch in the C++ grammar
* in the distribution version of 2.5.5).
*/
#if !defined(__GNUC__) || (__GNUC__ < 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ < 5))
#undef __attribute__
#define __attribute__(x) /* delete __attribute__ if non-gcc or older than gcc 2.5 */
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#undef __dead
#undef __pure
#define __dead __volatile
#define __pure __const
#undef __dead2
#define __dead2
#endif
#endif
 
/*
* Delete pseudo-keywords wherever they are not available or needed.
* This seems to break MingW in mysterious ways, so leave it,
*/
#ifndef __dead
#define __dead
#endif
 
#ifndef __dead2
#define __dead2
#endif
 
#ifndef __pure
#define __pure
#endif
 
/*
* min() & max() macros
*/
#if defined(__HIGHC__)
#undef min
#undef max
#define min(a,b) _min(a,b) /* intrinsic functions */
#define max(a,b) _max(a,b)
#endif
 
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
 
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
 
/*
* from NetBSD's <sys/cdefs_aout.h>
*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
* Public domain.
*/
 
/* #define _C_LABEL(x) __CONCAT(_,x) */
 
#if defined(__GNUC__)
#define __indr_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0");\
__asm__(".stabs \"_" #sym "\",1,0,0,0");
 
#define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0");
 
#define __IDSTRING(name,string) \
static const char name[] __attribute__((__unused__)) = string
#else
#define __indr_reference(sym,alias)
#define __warn_references(sym,msg)
#define __IDSTRING(name,string) static const char name[] = string
#endif
 
#define __RCSID(_s) __IDSTRING(rcsid,_s)
#define __COPYRIGHT(_s) __IDSTRING(copyright,_s)
 
#define __KERNEL_RCSID(_n,_s) __IDSTRING(__CONCAT(rcsid,_n),_s)
#define __KERNEL_COPYRIGHT(_n,_s) __IDSTRING(__CONCAT(copyright,_n),_s)
 
#endif
/pkgnet/watt32/inc/sys/digmars.err
0,0 → 1,110
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE IS GENERATED BY E:\NET\WATT\UTIL\DM_ERR.EXE. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 42)
*/
 
#ifndef __DMC__
#error This file is only for use by "__DMC__"
#endif
 
#define EWOULDBLOCK 43
#define EDOM 33
#define ERANGE 34
#define E2BIG 7
#define EACCES 13
#define EAGAIN 11
#define EBADF 9
#define EBUSY 16
#define ECHILD 10
#define EDEADLK 36
#define EEXIST 17
#define EFAULT 14
#define EFBIG 27
#define EINTR 4
#define EINVAL 22
#define EIO 5
#define EISDIR 21
#define EMFILE 24
#define EMLINK 31
#define ENAMETOOLONG 38
#define ENFILE 23
#define ENODEV 19
#define ENOENT 2
#define ENOEXEC 8
#define ENOLCK 39
#define ENOMEM 12
#define ENOSPC 28
#define ENOSYS 40
#define ENOTDIR 20
#define ENOTEMPTY 41
#define ENOTTY 25
#define ENXIO 6
#define EPERM 1
#define EPIPE 32
#define EROFS 30
#define ESPIPE 29
#define ESRCH 3
#define EXDEV 18
#define ENMFILE 44
#define EINPROGRESS 45
#define EALREADY 46
#define ENOTSOCK 47
#define EDESTADDRREQ 48
#define EMSGSIZE 49
#define EPROTOTYPE 50
#define ENOPROTOOPT 51
#define EPROTONOSUPPORT 52
#define ESOCKTNOSUPPORT 53
#define EOPNOTSUPP 54
#define EPFNOSUPPORT 55
#define EAFNOSUPPORT 56
#define EADDRINUSE 57
#define EADDRNOTAVAIL 58
#define ENETDOWN 59
#define ENETUNREACH 60
#define ENETRESET 61
#define ECONNABORTED 62
#define ECONNRESET 63
#define ENOBUFS 64
#define EISCONN 65
#define ENOTCONN 66
#define ESHUTDOWN 67
#define ETIMEDOUT 68
#define ECONNREFUSED 69
#define EHOSTDOWN 70
#define EHOSTUNREACH 71
#define ESTALE 72
#define EREMOTE 73
#define EBADRPC 74
#define ERPCMISMATCH 75
#define EPROGUNAVAIL 76
#define EPROGMISMATCH 77
#define EPROCUNAVAIL 78
#define EILSEQ 42
#define EINVFNC 79
#define ENOPATH 80
#define ECONTR 81
#define EINVMEM 82
#define EINVENV 83
#define EINVFMT 84
#define EINVACC 85
#define EINVDAT 86
#define EDEADLOCK 36
#define ECURDIR 87
#define ENOTSAM 88
#define ETXTBSY 26
#define ENOTBLK 15
#define EUCLEAN 35
#define ETOOMANYREFS 89
#define ELOOP 90
#define EPROCLIM 91
#define EUSERS 92
#define EDQUOT 93
#define EVDBAD 94
#define ENORMTWD 95
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/djgpp.err
0,0 → 1,113
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE WAS GENERATED BY e:/net/watt/util/dj_err.exe. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 38)
*/
 
#ifndef __DJGPP__
#error This file is only for use by "__DJGPP__"
#endif
 
#define ERRNO_VENDOR_VERSION "2.03"
 
#define EWOULDBLOCK 39
#define EDOM 1
#define ERANGE 2
#define E2BIG 3
#define EACCES 4
#define EAGAIN 5
#define EBADF 6
#define EBUSY 7
#define ECHILD 8
#define EDEADLK 9
#define EEXIST 10
#define EFAULT 11
#define EFBIG 12
#define EINTR 13
#define EINVAL 14
#define EIO 15
#define EISDIR 16
#define EMFILE 17
#define EMLINK 18
#define ENAMETOOLONG 19
#define ENFILE 20
#define ENODEV 21
#define ENOENT 22
#define ENOEXEC 23
#define ENOLCK 24
#define ENOMEM 25
#define ENOSPC 26
#define ENOSYS 27
#define ENOTDIR 28
#define ENOTEMPTY 29
#define ENOTTY 30
#define ENXIO 31
#define EPERM 32
#define EPIPE 33
#define EROFS 34
#define ESPIPE 35
#define ESRCH 36
#define EXDEV 37
#define ENMFILE 38
#define EINPROGRESS 40
#define EALREADY 41
#define ENOTSOCK 42
#define EDESTADDRREQ 43
#define EMSGSIZE 44
#define EPROTOTYPE 45
#define ENOPROTOOPT 46
#define EPROTONOSUPPORT 47
#define ESOCKTNOSUPPORT 48
#define EOPNOTSUPP 49
#define EPFNOSUPPORT 50
#define EAFNOSUPPORT 51
#define EADDRINUSE 52
#define EADDRNOTAVAIL 53
#define ENETDOWN 54
#define ENETUNREACH 55
#define ENETRESET 56
#define ECONNABORTED 57
#define ECONNRESET 58
#define ENOBUFS 59
#define EISCONN 60
#define ENOTCONN 61
#define ESHUTDOWN 62
#define ETIMEDOUT 63
#define ECONNREFUSED 64
#define EHOSTDOWN 65
#define EHOSTUNREACH 66
#define ESTALE 67
#define EREMOTE 68
#define EBADRPC 69
#define ERPCMISMATCH 70
#define EPROGUNAVAIL 71
#define EPROGMISMATCH 72
#define EPROCUNAVAIL 73
#define EILSEQ 74
#define EINVFNC 75
#define ENOPATH 76
#define ECONTR 77
#define EINVMEM 78
#define EINVENV 79
#define EINVFMT 80
#define EINVACC 81
#define EINVDAT 82
#define EDEADLOCK 83
#define ECURDIR 84
#define ENOTSAM 85
#define ETXTBSY 86
#define ENOTBLK 87
#define EUCLEAN 88
#define ETOOMANYREFS 89
#define ELOOP 90
#define EPROCLIM 91
#define EUSERS 92
#define EDQUOT 93
#define EVDBAD 94
#define ENORMTWD 95
#define EOVERFLOW 96
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/errno.h
0,0 → 1,15
/*!\file sys/errno.h
*
* Compatibility header.
*/
 
/*
* The naming <sys/w??.h> is required for those compilers that
* have <sys/??.h> in the usual place but doesn't define stuff
* related to Watt-32's BSD-socket interface.
*/
 
#ifndef __SYS_WERRNO_H
#include <sys/werrno.h>
#endif
 
/pkgnet/watt32/inc/sys/highc.err
0,0 → 1,110
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE IS GENERATED BY E:\NET\WATT\UTIL\HC_ERR.EXE. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 70)
*/
 
#ifndef __HIGHC__
#error This file is only for use by "__HIGHC__"
#endif
 
#define EWOULDBLOCK 35
#define EDOM 33
#define ERANGE 34
#define E2BIG 7
#define EACCES 13
#define EAGAIN 11
#define EBADF 9
#define EBUSY 16
#define ECHILD 10
#define EDEADLK 35
#define EEXIST 17
#define EFAULT 14
#define EFBIG 27
#define EINTR 4
#define EINVAL 22
#define EIO 5
#define EISDIR 21
#define EMFILE 24
#define EMLINK 31
#define ENAMETOOLONG 63
#define ENFILE 23
#define ENODEV 19
#define ENOENT 2
#define ENOEXEC 8
#define ENOLCK 71
#define ENOMEM 12
#define ENOSPC 28
#define ENOSYS 72
#define ENOTDIR 20
#define ENOTEMPTY 66
#define ENOTTY 25
#define ENXIO 6
#define EPERM 1
#define EPIPE 32
#define EROFS 30
#define ESPIPE 29
#define ESRCH 3
#define EXDEV 18
#define ENMFILE 73
#define EINPROGRESS 36
#define EALREADY 37
#define ENOTSOCK 38
#define EDESTADDRREQ 39
#define EMSGSIZE 40
#define EPROTOTYPE 41
#define ENOPROTOOPT 42
#define EPROTONOSUPPORT 43
#define ESOCKTNOSUPPORT 44
#define EOPNOTSUPP 45
#define EPFNOSUPPORT 46
#define EAFNOSUPPORT 47
#define EADDRINUSE 48
#define EADDRNOTAVAIL 49
#define ENETDOWN 50
#define ENETUNREACH 51
#define ENETRESET 52
#define ECONNABORTED 53
#define ECONNRESET 54
#define ENOBUFS 55
#define EISCONN 56
#define ENOTCONN 57
#define ESHUTDOWN 58
#define ETIMEDOUT 60
#define ECONNREFUSED 61
#define EHOSTDOWN 64
#define EHOSTUNREACH 65
#define ESTALE 74
#define EREMOTE 75
#define EBADRPC 76
#define ERPCMISMATCH 77
#define EPROGUNAVAIL 78
#define EPROGMISMATCH 79
#define EPROCUNAVAIL 80
#define EILSEQ 81
#define EINVFNC 82
#define ENOPATH 83
#define ECONTR 84
#define EINVMEM 85
#define EINVENV 86
#define EINVFMT 87
#define EINVACC 88
#define EINVDAT 89
#define EDEADLOCK 35
#define ECURDIR 90
#define ENOTSAM 91
#define ETXTBSY 26
#define ENOTBLK 15
#define EUCLEAN 92
#define ETOOMANYREFS 59
#define ELOOP 62
#define EPROCLIM 67
#define EUSERS 68
#define EDQUOT 69
#define EVDBAD 70
#define ENORMTWD 93
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/ioctl.h
0,0 → 1,142
/*!\file sys/ioctl.h
* BSD socket I/O control.
*/
 
/*-
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)ioctl.h 7.19 (Berkeley) 6/26/91
*/
 
#ifndef __SYS_IOCTL_H
#define __SYS_IOCTL_H
 
/*
* Commands for ioctlsocket(), taken from the BSD file fcntl.h.
*
*
* Ioctl's have the command encoded in the lower word,
* and the size of any in or out parameters in the upper
* word. The high 2 bits of the upper word are used
* to encode the in/out status of the parameter; for now
* we restrict parameters to at most 128 bytes.
*/
 
#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */
 
#define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK)
#define IOCBASECMD(x) ((x) & ~IOCPARM_MASK)
#define IOCGROUP(x) (((x) >> 8) & 0xff)
 
#define IOCPARM_MAX 4096 /* max size of ioctl */
#define IOC_VOID 0x20000000 /* no parameters */
#define IOC_OUT 0x40000000 /* copy out parameters */
#define IOC_IN 0x80000000 /* copy in parameters */
#define IOC_INOUT (IOC_IN|IOC_OUT) /* 0x20000000 distinguishes new &
old ioctl's */
#define IOC_DIRMASK 0xe0000000 /* mask for IN/OUT/VOID */
 
#define _IO(x,y) (IOC_VOID|(x<<8)|y)
#define _IOR(x,y,t) (IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
#define _IOW(x,y,t) (IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
/* this should be _IORW, but stdio got there first */
#define _IOWR(x,y,t) (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
 
/*
* file i/o controls
*/
#define FIOCLEX _IO('f', 1) /* set close on exec on fd */
#define FIONCLEX _IO('f', 2) /* remove close on exec */
#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */
#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */
#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */
#define FIOSETOWN _IOW('f', 124, int) /* set owner (struct Task *) */
#define FIOGETOWN _IOR('f', 123, int) /* get owner (struct Task *) */
 
/*
* socket i/o controls
*
* SIOCSPGRP and SIOCGPGRP are identical to the FIOSETOWN and FIOGETOWN,
* respectively.
*/
#define SIOCSPGRP _IOW('s', 8, int) /* set process group */
#define SIOCGPGRP _IOR('s', 9, int) /* get process group */
 
/* #ifdef BSD */
#define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */
#define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */
 
#define SIOCSIFADDR _IOW('I', 12, struct ifreq) /* set ifnet address */
#define OSIOCGIFADDR _IOWR('I',13, struct ifreq) /* get ifnet address */
#define SIOCGIFADDR _IOWR('I',33, struct ifreq) /* get ifnet address */
#define SIOCSIFDSTADDR _IOW('I', 14, struct ifreq) /* set p-p address */
#define OSIOCGIFDSTADDR _IOWR('I',15, struct ifreq) /* get p-p address */
#define SIOCGIFDSTADDR _IOWR('I',34, struct ifreq) /* get p-p address */
#define SIOCSIFFLAGS _IOW('I', 16, struct ifreq) /* set ifnet flags */
#define SIOCGIFFLAGS _IOWR('I',17, struct ifreq) /* get ifnet flags */
#define OSIOCGIFBRDADDR _IOWR('I',18, struct ifreq) /* get broadcast addr */
#define SIOCGIFBRDADDR _IOWR('I',35, struct ifreq) /* get broadcast addr */
#define SIOCSIFBRDADDR _IOW('I',19, struct ifreq) /* set broadcast addr */
#define OSIOCGIFCONF _IOWR('I',20, struct ifconf) /* get ifnet list */
#define SIOCGIFCONF _IOWR('I',36, struct ifconf) /* get ifnet list */
#define OSIOCGIFNETMASK _IOWR('I',21, struct ifreq) /* get net addr mask */
#define SIOCGIFNETMASK _IOWR('I',37, struct ifreq) /* get net addr mask */
#define SIOCSIFNETMASK _IOW('I',22, struct ifreq) /* set net addr mask */
#define SIOCGIFMETRIC _IOWR('I',23, struct ifreq) /* get IF metric */
#define SIOCSIFMETRIC _IOW('I',24, struct ifreq) /* set IF metric */
#define SIOCDIFADDR _IOW('I',25, struct ifreq) /* delete IF addr */
#define SIOCAIFADDR _IOW('I',26, struct ifaliasreq) /* add/chg IF alias */
#define SIOCGIFMTU _IOWR('I',27, struct ifreq) /* get IF mtu */
#define SIOCGIFHWADDR _IOWR('I',28, struct ifconf) /* get hardware addr */
#define OSIOCGIFHWADDR SIOCGIFHWADDR
 
#define SIOCSARP _IOW('I', 30, struct arpreq) /* set arp entry */
#define OSIOCGARP _IOWR('I',31, struct arpreq) /* get arp entry */
#define SIOCGARP _IOWR('I',38, struct arpreq) /* get arp entry */
#define SIOCDARP _IOW('I', 32, struct arpreq) /* delete arp entry */
/* #endif */ /* BSD */
 
/* MS-DOS */
#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */
#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */
 
/* Since this file shadows the normal djgpp <sys/ioctl.h>, we provide
* this prototype here.
*/
#if defined(DJGPP)
int ioctl (int __fd, int __cmd, ...);
#endif
 
#endif /* !SYS_IOCTL_H */
/pkgnet/watt32/inc/sys/ladsoft.err
0,0 → 1,113
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE IS GENERATED BY E:\NET\WATT\UTIL\LS_ERR.EXE. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 50)
*/
 
#ifndef __CCDL__
#error This file is only for use by "__CCDL__"
#endif
 
#define ERRNO_VENDOR_VERSION "2.30"
 
#define EWOULDBLOCK 51
#define EDOM 33
#define ERANGE 34
#define E2BIG 20
#define EACCES 5
#define EAGAIN 42
#define EBADF 6
#define EBUSY 44
#define ECHILD 24
#define EDEADLK 52
#define EEXIST 35
#define EFAULT 14
#define EFBIG 27
#define EINTR 39
#define EINVAL 19
#define EIO 40
#define EISDIR 46
#define EMFILE 4
#define EMLINK 31
#define ENAMETOOLONG 48
#define ENFILE 23
#define ENODEV 15
#define ENOENT 2
#define ENOEXEC 21
#define ENOLCK 53
#define ENOMEM 8
#define ENOSPC 28
#define ENOSYS 54
#define ENOTDIR 45
#define ENOTEMPTY 55
#define ENOTTY 25
#define ENXIO 41
#define EPERM 37
#define EPIPE 32
#define EROFS 30
#define ESPIPE 29
#define ESRCH 38
#define EXDEV 22
#define ENMFILE 18
#define EINPROGRESS 56
#define EALREADY 57
#define ENOTSOCK 58
#define EDESTADDRREQ 59
#define EMSGSIZE 60
#define EPROTOTYPE 61
#define ENOPROTOOPT 62
#define EPROTONOSUPPORT 63
#define ESOCKTNOSUPPORT 64
#define EOPNOTSUPP 65
#define EPFNOSUPPORT 66
#define EAFNOSUPPORT 67
#define EADDRINUSE 68
#define EADDRNOTAVAIL 69
#define ENETDOWN 70
#define ENETUNREACH 71
#define ENETRESET 72
#define ECONNABORTED 73
#define ECONNRESET 74
#define ENOBUFS 75
#define EISCONN 76
#define ENOTCONN 77
#define ESHUTDOWN 78
#define ETIMEDOUT 79
#define ECONNREFUSED 80
#define EHOSTDOWN 81
#define EHOSTUNREACH 82
#define ESTALE 83
#define EREMOTE 84
#define EBADRPC 85
#define ERPCMISMATCH 86
#define EPROGUNAVAIL 87
#define EPROGMISMATCH 88
#define EPROCUNAVAIL 89
#define EILSEQ 90
#define EINVFNC 1
#define ENOPATH 3
#define ECONTR 7
#define EINVMEM 9
#define EINVENV 10
#define EINVFMT 11
#define EINVACC 12
#define EINVDAT 13
#define EDEADLOCK 36
#define ECURDIR 16
#define ENOTSAM 17
#define ETXTBSY 26
#define ENOTBLK 43
#define EUCLEAN 47
#define ETOOMANYREFS 91
#define ELOOP 92
#define EPROCLIM 93
#define EUSERS 94
#define EDQUOT 95
#define EVDBAD 96
#define ENORMTWD 97
#define EOVERFLOW 98
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/lcc.err
0,0 → 1,111
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE WAS GENERATED BY ..\util\lcc_err. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 42)
*/
 
#ifndef __LCC__
#error This file is only for use by "__LCC__"
#endif
 
#define EWOULDBLOCK 43
#define EDOM 33
#define ERANGE 34
#define E2BIG 7
#define EACCES 13
#define EAGAIN 11
#define EBADF 9
#define EBUSY 16
#define ECHILD 10
#define EDEADLK 45
#define EEXIST 17
#define EFAULT 14
#define EFBIG 27
#define EINTR 4
#define EINVAL 22
#define EIO 5
#define EISDIR 21
#define EMFILE 24
#define EMLINK 31
#define ENAMETOOLONG 91
#define ENFILE 23
#define ENODEV 19
#define ENOENT 2
#define ENOEXEC 8
#define ENOLCK 46
#define ENOMEM 12
#define ENOSPC 28
#define ENOSYS 88
#define ENOTDIR 20
#define ENOTEMPTY 90
#define ENOTTY 25
#define ENXIO 6
#define EPERM 1
#define EPIPE 32
#define EROFS 30
#define ESPIPE 29
#define ESRCH 3
#define EXDEV 18
#define ENMFILE 89
#define EINPROGRESS 44
#define EALREADY 45
#define ENOTSOCK 46
#define EDESTADDRREQ 47
#define EMSGSIZE 48
#define EPROTOTYPE 49
#define ENOPROTOOPT 50
#define EPROTONOSUPPORT 51
#define ESOCKTNOSUPPORT 52
#define EOPNOTSUPP 53
#define EPFNOSUPPORT 54
#define EAFNOSUPPORT 55
#define EADDRINUSE 56
#define EADDRNOTAVAIL 57
#define ENETDOWN 58
#define ENETUNREACH 59
#define ENETRESET 60
#define ECONNABORTED 61
#define ECONNRESET 62
#define ENOBUFS 63
#define EISCONN 64
#define ENOTCONN 65
#define ESHUTDOWN 66
#define ETIMEDOUT 67
#define ECONNREFUSED 68
#define EHOSTDOWN 69
#define EHOSTUNREACH 70
#define ESTALE 71
#define EREMOTE 66
#define EBADRPC 72
#define ERPCMISMATCH 73
#define EPROGUNAVAIL 74
#define EPROGMISMATCH 75
#define EPROCUNAVAIL 76
#define EILSEQ 77
#define EINVFNC 78
#define ENOPATH 79
#define ECONTR 80
#define EINVMEM 81
#define EINVENV 82
#define EINVFMT 83
#define EINVACC 84
#define EINVDAT 85
#define EDEADLOCK 56
#define ECURDIR 86
#define ENOTSAM 87
#define ETXTBSY 26
#define ENOTBLK 15
#define EUCLEAN 88
#define ETOOMANYREFS 89
#define ELOOP 90
#define EPROCLIM 91
#define EUSERS 92
#define EDQUOT 93
#define EVDBAD 94
#define ENORMTWD 95
#define EOVERFLOW 96
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/mingw32.err
0,0 → 1,113
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE WAS GENERATED BY ..\util\mw_err. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 42)
*/
 
#ifndef __MINGW32__
#error This file is only for use by "__MINGW32__"
#endif
 
#define ERRNO_VENDOR_VERSION "3.7"
 
#define EWOULDBLOCK 43
#define EDOM 33
#define ERANGE 34
#define E2BIG 7
#define EACCES 13
#define EAGAIN 11
#define EBADF 9
#define EBUSY 16
#define ECHILD 10
#define EDEADLK 36
#define EEXIST 17
#define EFAULT 14
#define EFBIG 27
#define EINTR 4
#define EINVAL 22
#define EIO 5
#define EISDIR 21
#define EMFILE 24
#define EMLINK 31
#define ENAMETOOLONG 38
#define ENFILE 23
#define ENODEV 19
#define ENOENT 2
#define ENOEXEC 8
#define ENOLCK 39
#define ENOMEM 12
#define ENOSPC 28
#define ENOSYS 40
#define ENOTDIR 20
#define ENOTEMPTY 41
#define ENOTTY 25
#define ENXIO 6
#define EPERM 1
#define EPIPE 32
#define EROFS 30
#define ESPIPE 29
#define ESRCH 3
#define EXDEV 18
#define ENMFILE 44
#define EINPROGRESS 45
#define EALREADY 46
#define ENOTSOCK 47
#define EDESTADDRREQ 48
#define EMSGSIZE 49
#define EPROTOTYPE 50
#define ENOPROTOOPT 51
#define EPROTONOSUPPORT 52
#define ESOCKTNOSUPPORT 53
#define EOPNOTSUPP 54
#define EPFNOSUPPORT 55
#define EAFNOSUPPORT 56
#define EADDRINUSE 57
#define EADDRNOTAVAIL 58
#define ENETDOWN 59
#define ENETUNREACH 60
#define ENETRESET 61
#define ECONNABORTED 62
#define ECONNRESET 63
#define ENOBUFS 64
#define EISCONN 65
#define ENOTCONN 66
#define ESHUTDOWN 67
#define ETIMEDOUT 68
#define ECONNREFUSED 69
#define EHOSTDOWN 70
#define EHOSTUNREACH 71
#define ESTALE 72
#define EREMOTE 73
#define EBADRPC 74
#define ERPCMISMATCH 75
#define EPROGUNAVAIL 76
#define EPROGMISMATCH 77
#define EPROCUNAVAIL 78
#define EILSEQ 42
#define EINVFNC 79
#define ENOPATH 80
#define ECONTR 81
#define EINVMEM 82
#define EINVENV 83
#define EINVFMT 84
#define EINVACC 85
#define EINVDAT 86
#define EDEADLOCK 36
#define ECURDIR 87
#define ENOTSAM 88
#define ETXTBSY 89
#define ENOTBLK 90
#define EUCLEAN 91
#define ETOOMANYREFS 92
#define ELOOP 93
#define EPROCLIM 94
#define EUSERS 95
#define EDQUOT 96
#define EVDBAD 97
#define ENORMTWD 98
#define EOVERFLOW 99
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/packoff.h
0,0 → 1,70
/*!\file sys/packoff.h
*
* Default packing of structures.
*/
 
/*++
 
Copyright (c) 1990,91 Microsoft Corporation
 
Module Name:
 
packoff.h
 
Abstract:
 
This file turns packing of structures off. (That is, it enables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
 
packoff.h is the complement to packon.h. An inclusion of packoff.h
MUST ALWAYS be preceded by an inclusion of packon.h, in one-to-one
correspondence.
 
Author:
 
Chuck Lenzmeier (chuckl) 4-Mar-1990
 
Revision History:
 
15-Apr-1991 JohnRo
Created lint-able variant.
 
20-Oct-1997 G.Vanem
Added Metaware support
 
05-Jul-1999 G.Vanem
Added LADsoft support
 
01-Nov-2000 G. Vanem
Added Visual C/C++ support
 
--*/
 
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
#pragma option push -b -a8 -pc -A- /*P_O_Push*/
#endif
 
#if !(defined(lint) || defined(_lint))
#if defined(_MSC_VER) && (_MSC_VER >= 800)
#pragma warning(disable:4103)
#endif
 
#if defined(__CCDL__)
#pragma pack()
#elif defined(__HIGHC__)
#pragma pop_align_members();
#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1000)
#pragma pack(__pop);
#elif (defined(_MSC_VER) && (_MSC_VER > 800)) || \
(defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
defined(__POCC__) || defined(__LCC__)
#pragma pack(pop)
#else
#pragma pack()
#endif
#endif
 
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
#pragma option pop /*P_O_Pop*/
#endif
/pkgnet/watt32/inc/sys/packon.h
0,0 → 1,66
/*!\file sys/packon.h
*
* Sets structure packing to 1 byte.
*/
 
/*++
 
Copyright (c) 1990,91 Microsoft Corporation
 
Module Name:
 
packon.h
 
Abstract:
 
This file turns packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
 
The file packoff.h is the complement to this file.
 
Author:
 
Chuck Lenzmeier (chuckl) 4-Mar-1990
 
Revision History:
 
15-Apr-1991 JohnRo
Created lint-able variant.
 
20-Oct-1997 G.Vanem
Added Metaware support
 
05-Jul-1999 G.Vanem
Added LADsoft support
 
01-Nov-2000 G. Vanem
Added Visual C/C++ support
 
--*/
 
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
#pragma option push -b -a8 -pc -A- /*P_O_Push*/
#endif
 
#if !(defined(lint) || defined(_lint))
#if defined(_MSC_VER) && (_MSC_VER >= 800)
#pragma warning(disable:4103)
#endif
 
#if defined(__HIGHC__)
#pragma push_align_members(1);
#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1000)
#pragma pack(__push,1);
#elif (defined(_MSC_VER) && (_MSC_VER > 800)) || \
(defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
defined(__POCC__) || defined(__LCC__)
#pragma pack(push,1)
#else
#pragma pack(1)
#endif
#endif
 
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
#pragma option pop /*P_O_Pop*/
#endif
/pkgnet/watt32/inc/sys/param.h
0,0 → 1,35
/*!\file sys/param.h
*
* Miscellaneous defines.
*/
 
/* sys/param.h (wattcp) */
 
#ifndef __SYS_PARAM_H
#define __SYS_PARAM_H
 
#ifndef PAGE_SIZE
#define PAGE_SIZE 0x1000
#endif
 
#ifndef HZ
#define HZ 100
#endif
 
#ifndef MAXNAMLEN
#define MAXNAMLEN 260
#endif
 
#ifndef MAXPATHLEN
#define MAXPATHLEN 260
#endif
 
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 256
#endif
 
#ifndef __SYS_SWAP_BYTES_H
#include <sys/swap.h>
#endif
 
#endif
/pkgnet/watt32/inc/sys/pellesc.err
0,0 → 1,113
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE WAS GENERATED BY ..\util\po_err. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 41)
*/
 
#ifndef __POCC__
#error This file is only for use by "__POCC__"
#endif
 
#define ERRNO_VENDOR_VERSION "4.0"
 
#define EWOULDBLOCK 42
#define EDOM 33
#define ERANGE 34
#define E2BIG 43
#define EACCES 13
#define EAGAIN 11
#define EBADF 9
#define EBUSY 44
#define ECHILD 10
#define EDEADLK 36
#define EEXIST 17
#define EFAULT 45
#define EFBIG 46
#define EINTR 47
#define EINVAL 22
#define EIO 48
#define EISDIR 49
#define EMFILE 24
#define EMLINK 50
#define ENAMETOOLONG 51
#define ENFILE 52
#define ENODEV 53
#define ENOENT 2
#define ENOEXEC 8
#define ENOLCK 54
#define ENOMEM 12
#define ENOSPC 28
#define ENOSYS 55
#define ENOTDIR 56
#define ENOTEMPTY 57
#define ENOTTY 58
#define ENXIO 59
#define EPERM 60
#define EPIPE 32
#define EROFS 61
#define ESPIPE 62
#define ESRCH 63
#define EXDEV 18
#define ENMFILE 64
#define EINPROGRESS 65
#define EALREADY 66
#define ENOTSOCK 67
#define EDESTADDRREQ 68
#define EMSGSIZE 69
#define EPROTOTYPE 70
#define ENOPROTOOPT 71
#define EPROTONOSUPPORT 72
#define ESOCKTNOSUPPORT 73
#define EOPNOTSUPP 74
#define EPFNOSUPPORT 75
#define EAFNOSUPPORT 76
#define EADDRINUSE 77
#define EADDRNOTAVAIL 78
#define ENETDOWN 79
#define ENETUNREACH 80
#define ENETRESET 81
#define ECONNABORTED 82
#define ECONNRESET 83
#define ENOBUFS 84
#define EISCONN 85
#define ENOTCONN 86
#define ESHUTDOWN 87
#define ETIMEDOUT 88
#define ECONNREFUSED 89
#define EHOSTDOWN 90
#define EHOSTUNREACH 91
#define ESTALE 92
#define EREMOTE 93
#define EBADRPC 94
#define ERPCMISMATCH 95
#define EPROGUNAVAIL 96
#define EPROGMISMATCH 97
#define EPROCUNAVAIL 98
#define EILSEQ 42
#define EINVFNC 99
#define ENOPATH 100
#define ECONTR 101
#define EINVMEM 102
#define EINVENV 103
#define EINVFMT 104
#define EINVACC 105
#define EINVDAT 106
#define EDEADLOCK 107
#define ECURDIR 108
#define ENOTSAM 109
#define ETXTBSY 110
#define ENOTBLK 111
#define EUCLEAN 112
#define ETOOMANYREFS 113
#define ELOOP 114
#define EPROCLIM 115
#define EUSERS 116
#define EDQUOT 117
#define EVDBAD 118
#define ENORMTWD 119
#define EOVERFLOW 120
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/poll.h
0,0 → 1,22
/*!\file sys/poll.h
*
*/
#ifndef __SYS_POLL_H
#define __SYS_POLL_H
 
#define POLLIN 0x0001
#define POLLPRI 0x0002 /* not used */
#define POLLOUT 0x0004
#define POLLERR 0x0008
#define POLLHUP 0x0010 /* not used */
#define POLLNVAL 0x0020 /* not used */
 
struct pollfd {
int fd;
int events; /* in param: what to poll for */
int revents; /* out param: what events occured */
};
 
extern int poll (struct pollfd *p, int num, int timeout);
 
#endif
/pkgnet/watt32/inc/sys/queue.h
0,0 → 1,263
/*!\file sys/queue.h
*
*/
 
/*
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)queue.h 8.5 (Berkeley) 8/20/94
*/
 
#ifndef __SYS_QUEUE_H
#define __SYS_QUEUE_H
 
/*
* This file defines three types of data structures: lists, tail queues,
* and circular queues.
*
* A list is headed by a single forward pointer (or an array of forward
* pointers for a hash table header). The elements are doubly linked
* so that an arbitrary element can be removed without a need to
* traverse the list. New elements can be added to the list before
* or after an existing element or at the head of the list. A list
* may only be traversed in the forward direction.
*
* A tail queue is headed by a pair of pointers, one to the head of the
* list and the other to the tail of the list. The elements are doubly
* linked so that an arbitrary element can be removed without a need to
* traverse the list. New elements can be added to the list before or
* after an existing element, at the head of the list, or at the end of
* the list. A tail queue may only be traversed in the forward direction.
*
* A circle queue is headed by a pair of pointers, one to the head of the
* list and the other to the tail of the list. The elements are doubly
* linked so that an arbitrary element can be removed without a need to
* traverse the list. New elements can be added to the list before or after
* an existing element, at the head of the list, or at the end of the list.
* A circle queue may be traversed in either direction, but has a more
* complex end of list detection.
*
* For details on the use of these macros, see the queue(3) manual page.
*/
 
/*
* List definitions.
*/
#define LIST_HEAD(name, type) \
struct name { \
struct type *lh_first; /* first element */ \
}
 
#define LIST_ENTRY(type) \
struct { \
struct type *le_next; /* next element */ \
struct type **le_prev; /* address of previous next element */ \
}
 
/*
* List functions.
*/
#define LIST_INIT(head) { \
(head)->lh_first = NULL; \
}
 
#define LIST_INSERT_AFTER(listelm, elm, field) { \
if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
(listelm)->field.le_next->field.le_prev = \
&(elm)->field.le_next; \
(listelm)->field.le_next = (elm); \
(elm)->field.le_prev = &(listelm)->field.le_next; \
}
 
#define LIST_INSERT_BEFORE(listelm, elm, field) { \
(elm)->field.le_prev = (listelm)->field.le_prev; \
(elm)->field.le_next = (listelm); \
*(listelm)->field.le_prev = (elm); \
(listelm)->field.le_prev = &(elm)->field.le_next; \
}
 
#define LIST_INSERT_HEAD(head, elm, field) { \
if (((elm)->field.le_next = (head)->lh_first) != NULL) \
(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
(head)->lh_first = (elm); \
(elm)->field.le_prev = &(head)->lh_first; \
}
 
#define LIST_REMOVE(elm, field) { \
if ((elm)->field.le_next != NULL) \
(elm)->field.le_next->field.le_prev = \
(elm)->field.le_prev; \
*(elm)->field.le_prev = (elm)->field.le_next; \
}
 
/*
* Tail queue definitions.
*/
#define TAILQ_HEAD(name, type) \
struct name { \
struct type *tqh_first; /* first element */ \
struct type **tqh_last; /* addr of last next element */ \
}
 
#define TAILQ_ENTRY(type) \
struct { \
struct type *tqe_next; /* next element */ \
struct type **tqe_prev; /* address of previous next element */ \
}
 
/*
* Tail queue functions.
*/
#define TAILQ_INIT(head) { \
(head)->tqh_first = NULL; \
(head)->tqh_last = &(head)->tqh_first; \
}
 
#define TAILQ_INSERT_HEAD(head, elm, field) { \
if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
(head)->tqh_first->field.tqe_prev = \
&(elm)->field.tqe_next; \
else \
(head)->tqh_last = &(elm)->field.tqe_next; \
(head)->tqh_first = (elm); \
(elm)->field.tqe_prev = &(head)->tqh_first; \
}
 
#define TAILQ_INSERT_TAIL(head, elm, field) { \
(elm)->field.tqe_next = NULL; \
(elm)->field.tqe_prev = (head)->tqh_last; \
*(head)->tqh_last = (elm); \
(head)->tqh_last = &(elm)->field.tqe_next; \
}
 
#define TAILQ_INSERT_AFTER(head, listelm, elm, field) { \
if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
(elm)->field.tqe_next->field.tqe_prev = \
&(elm)->field.tqe_next; \
else \
(head)->tqh_last = &(elm)->field.tqe_next; \
(listelm)->field.tqe_next = (elm); \
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
}
 
#define TAILQ_INSERT_BEFORE(listelm, elm, field) { \
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
(elm)->field.tqe_next = (listelm); \
*(listelm)->field.tqe_prev = (elm); \
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
}
 
#define TAILQ_REMOVE(head, elm, field) { \
if (((elm)->field.tqe_next) != NULL) \
(elm)->field.tqe_next->field.tqe_prev = \
(elm)->field.tqe_prev; \
else \
(head)->tqh_last = (elm)->field.tqe_prev; \
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
}
 
/*
* Circular queue definitions.
*/
#define CIRCLEQ_HEAD(name, type) \
struct name { \
struct type *cqh_first; /* first element */ \
struct type *cqh_last; /* last element */ \
}
 
#define CIRCLEQ_ENTRY(type) \
struct { \
struct type *cqe_next; /* next element */ \
struct type *cqe_prev; /* previous element */ \
}
 
/*
* Circular queue functions.
*/
#define CIRCLEQ_INIT(head) { \
(head)->cqh_first = (void *)(head); \
(head)->cqh_last = (void *)(head); \
}
 
#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) { \
(elm)->field.cqe_next = (listelm)->field.cqe_next; \
(elm)->field.cqe_prev = (listelm); \
if ((listelm)->field.cqe_next == (void *)(head)) \
(head)->cqh_last = (elm); \
else \
(listelm)->field.cqe_next->field.cqe_prev = (elm); \
(listelm)->field.cqe_next = (elm); \
}
 
#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) { \
(elm)->field.cqe_next = (listelm); \
(elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
if ((listelm)->field.cqe_prev == (void *)(head)) \
(head)->cqh_first = (elm); \
else \
(listelm)->field.cqe_prev->field.cqe_next = (elm); \
(listelm)->field.cqe_prev = (elm); \
}
 
#define CIRCLEQ_INSERT_HEAD(head, elm, field) { \
(elm)->field.cqe_next = (head)->cqh_first; \
(elm)->field.cqe_prev = (void *)(head); \
if ((head)->cqh_last == (void *)(head)) \
(head)->cqh_last = (elm); \
else \
(head)->cqh_first->field.cqe_prev = (elm); \
(head)->cqh_first = (elm); \
}
 
#define CIRCLEQ_INSERT_TAIL(head, elm, field) { \
(elm)->field.cqe_next = (void *)(head); \
(elm)->field.cqe_prev = (head)->cqh_last; \
if ((head)->cqh_first == (void *)(head)) \
(head)->cqh_first = (elm); \
else \
(head)->cqh_last->field.cqe_next = (elm); \
(head)->cqh_last = (elm); \
}
 
#define CIRCLEQ_REMOVE(head, elm, field) { \
if ((elm)->field.cqe_next == (void *)(head)) \
(head)->cqh_last = (elm)->field.cqe_prev; \
else \
(elm)->field.cqe_next->field.cqe_prev = \
(elm)->field.cqe_prev; \
if ((elm)->field.cqe_prev == (void *)(head)) \
(head)->cqh_first = (elm)->field.cqe_next; \
else \
(elm)->field.cqe_prev->field.cqe_next = \
(elm)->field.cqe_next; \
}
#endif
/pkgnet/watt32/inc/sys/quickc.err
0,0 → 1,110
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE IS GENERATED BY E:\NET\WATT\UTIL\MS_ERR.EXE. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 36)
*/
 
#ifndef _MSC_VER
#error This file is only for use by "_MSC_VER"
#endif
 
#define EWOULDBLOCK 37
#define EDOM 33
#define ERANGE 34
#define E2BIG 7
#define EACCES 13
#define EAGAIN 11
#define EBADF 9
#define EBUSY 16
#define ECHILD 10
#define EDEADLK 38
#define EEXIST 17
#define EFAULT 14
#define EFBIG 27
#define EINTR 4
#define EINVAL 22
#define EIO 5
#define EISDIR 21
#define EMFILE 24
#define EMLINK 31
#define ENAMETOOLONG 39
#define ENFILE 23
#define ENODEV 19
#define ENOENT 2
#define ENOEXEC 8
#define ENOLCK 40
#define ENOMEM 12
#define ENOSPC 28
#define ENOSYS 41
#define ENOTDIR 20
#define ENOTEMPTY 42
#define ENOTTY 25
#define ENXIO 6
#define EPERM 1
#define EPIPE 32
#define EROFS 30
#define ESPIPE 29
#define ESRCH 3
#define EXDEV 18
#define ENMFILE 43
#define EINPROGRESS 44
#define EALREADY 45
#define ENOTSOCK 46
#define EDESTADDRREQ 47
#define EMSGSIZE 48
#define EPROTOTYPE 49
#define ENOPROTOOPT 50
#define EPROTONOSUPPORT 51
#define ESOCKTNOSUPPORT 52
#define EOPNOTSUPP 53
#define EPFNOSUPPORT 54
#define EAFNOSUPPORT 55
#define EADDRINUSE 56
#define EADDRNOTAVAIL 57
#define ENETDOWN 58
#define ENETUNREACH 59
#define ENETRESET 60
#define ECONNABORTED 61
#define ECONNRESET 62
#define ENOBUFS 63
#define EISCONN 64
#define ENOTCONN 65
#define ESHUTDOWN 66
#define ETIMEDOUT 67
#define ECONNREFUSED 68
#define EHOSTDOWN 69
#define EHOSTUNREACH 70
#define ESTALE 71
#define EREMOTE 72
#define EBADRPC 73
#define ERPCMISMATCH 74
#define EPROGUNAVAIL 75
#define EPROGMISMATCH 76
#define EPROCUNAVAIL 77
#define EILSEQ 78
#define EINVFNC 79
#define ENOPATH 80
#define ECONTR 81
#define EINVMEM 82
#define EINVENV 83
#define EINVFMT 84
#define EINVACC 85
#define EINVDAT 86
#define EDEADLOCK 36
#define ECURDIR 87
#define ENOTSAM 88
#define ETXTBSY 26
#define ENOTBLK 15
#define EUCLEAN 35
#define ETOOMANYREFS 89
#define ELOOP 90
#define EPROCLIM 91
#define EUSERS 92
#define EDQUOT 93
#define EVDBAD 94
#define ENORMTWD 95
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/select.h
0,0 → 1,6
/*!\file sys/select.h
*
* Compatibility header.
*/
 
#include <tcp.h> /* select_s() */
/pkgnet/watt32/inc/sys/so_ioctl.h
0,0 → 1,98
/*!\file sys/so_ioctl.h
*
* BSD socket I/O control.
*/
 
/* so_ioctl.h derived from BSD's ioctl.h by hv and em 1994
*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* from: @(#)ioctl.h 7.19 (Berkeley) 6/26/91
*/
 
#ifndef __SYS_SO_IOCTL_H
#define __SYS_SO_IOCTL_H
 
#undef _IOC
#undef _IOW
#undef _IOR
#undef _IOWR
 
#define _IOC(a,b) ((a<<8)|b)
#define _IOW(a,b,c) _IOC(a,b)
#define _IOR(a,b,c) _IOC(a,b)
#define _IOWR(a,b,c) _IOC(a,b)
 
#define _TCPIP_FIONREAD _IOC('f', 127)
#define FIONBIO _IOC('f', 126)
#define FIOASYNC _IOC('f', 125)
#define FIOTCPCKSUM _IOC('f', 128)
#define FIONSTATUS _IOC('f', 120)
#define FIONURG _IOC('f', 121)
 
/* socket i/o controls */
#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */
#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */
#define SIOCSPGRP _IOW('s', 8, int) /* set process group */
#define SIOCGPGRP _IOR('s', 9, int) /* get process group */
 
#define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */
#define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */
 
#define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */
#define SIOCGIFADDR _IOWR('i',13, struct ifreg) /* get ifnet addres */
#define OSIOCGIFADDR SIOCGIFADDR
#define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */
#define SIOCGIFDSTADDR _IOWR('i',15, struct ifreq) /* get p-p address */
#define OSIOCGIFDSTADDR SIOCGIFDSTADDR
#define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */
#define SIOCGIFFLAGS _IOWR('i',17, struct ifreq) /* get ifnet flags */
#define SIOCGIFBRDADDR _IOWR('i',18, struct ifreq) /* get broadcast addr */
#define OSIOCGIFBRDADDR SIOCGIFBRDADDR
#define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */
#define SIOCGIFCONF _IOWR('i',20, struct ifreq) /* get ifnet list */
#define OSIOCGIFCONF SIOCGIFCONF
#define SIOCGIFNETMASK _IOWR('i',21, struct ifreq) /* get net addr mask */
#define OSIOCGIFNETMASK SIOCGIFNETMASK
#define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */
#define SIOCGIFMETRIC _IOWR('i',23, struct ifreq) /* get if metric */
#define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set if metric */
 
#define SIOCSARP _IOW('i', 30, struct arpreq) /* set arp entry */
#define SIOCGARP _IOWR('i',31, struct arpreq) /* get arp entry */
#define OSIOCGARP SIOCGARP
#define SIOCDARP _IOW('i', 32, struct arpreq) /* delete arp entry */
 
#endif
/pkgnet/watt32/inc/sys/socket.h
0,0 → 1,305
/*!\file sys/socket.h
*
* BSD socket API.
*/
 
/* Modified for emx by hv and em 1994-1995
*
* Copyright (c) 1982,1985,1986,1988 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* from: @(#)socket.h 7.13 (Berkeley) 4/20/91
* $Id: socket.h,v 1.5 1993/06/27 05:59:06 andrew Exp $
*/
 
#ifndef __SYS_SOCKET_H
#define __SYS_SOCKET_H
 
#ifndef __SYS_W32API_H
#include <sys/w32api.h>
#endif
 
#ifndef __SYS_WERRNO_H
/*#include <sys/werrno.h>*/
#endif
 
#ifndef __SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
 
#ifndef __SYS_WTYPES_H
#include <sys/wtypes.h>
#endif
 
#ifndef __SYS_WTIME_H
#include <sys/wtime.h>
#endif
 
#ifndef __NETINET_IN_H
#include <netinet/in.h>
#endif
 
/*
* Definitions related to sockets: types, address families, options.
*/
 
/*
* This is used instead of -1, since the socket type is signed.
*/
#define INVALID_SOCKET (int)(~0)
#define SOCKET_ERROR (-1)
 
/*
* Types
*/
#define SOCK_STREAM 1 /* stream socket */
#define SOCK_DGRAM 2 /* datagram socket */
#define SOCK_RAW 3 /* raw-protocol interface */
#define SOCK_RDM 4 /* reliably-delivered message */
#define SOCK_SEQPACKET 5 /* sequenced packet stream */
#define SOCK_PACKET 10 /* linux specific way of */
/* getting packets at the dev */
/* level. For writing rarp and */
/* other similar things on the */
/* user level. */
 
/*
* Option flags per-socket.
*/
#define SO_DEBUG 0x0001 /* turn on debugging info recording */
#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */
#define SO_REUSEADDR 0x0004 /* allow local address reuse */
#define SO_KEEPALIVE 0x0008 /* keep connections alive */
#define SO_DONTROUTE 0x0010 /* just use interface addresses */
#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */
#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */
#define SO_LINGER 0x0080 /* linger on close if data present */
#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
 
#define SO_DONTLINGER (int)(~SO_LINGER)
 
/*
* Additional options, not kept in so_options.
*/
#define SO_SNDBUF 0x1001 /* send buffer size */
#define SO_RCVBUF 0x1002 /* receive buffer size */
#define SO_SNDLOWAT 0x1003 /* send low-water mark */
#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
#define SO_SNDTIMEO 0x1005 /* send timeout */
#define SO_RCVTIMEO 0x1006 /* receive timeout */
#define SO_ERROR 0x1007 /* get error status and clear */
#define SO_TYPE 0x1008 /* get socket type */
 
 
#include <sys/packon.h>
 
/*
* Structure used for manipulating linger option.
*/
struct linger {
int l_onoff; /* option on/off */
int l_linger; /* linger time */
};
 
/*
* Level number for (get/set)sockopt() to apply to socket itself.
*/
#define SOL_SOCKET 0xffff /* options for socket level */
 
/*
* Address families.
*/
#define AF_UNSPEC 0 /* unspecified */
#define AF_UNIX 1 /* local to host (pipes, portals) */
#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
#define AF_IMPLINK 3 /* arpanet imp addresses */
#define AF_PUP 4 /* pup protocols: e.g. BSP */
#define AF_CHAOS 5 /* mit CHAOS protocols */
#define AF_NS 6 /* XEROX NS protocols */
#define AF_ISO 7 /* ISO protocols */
#define AF_OSI AF_ISO
#define AF_ECMA 8 /* european computer manufacturers */
#define AF_DATAKIT 9 /* datakit protocols */
#define AF_CCITT 10 /* CCITT protocols, X.25 etc */
#define AF_SNA 11 /* IBM SNA */
#define AF_DECnet 12 /* DECnet */
#define AF_DLI 13 /* DEC Direct data link interface */
#define AF_LAT 14 /* LAT */
#define AF_HYLINK 15 /* NSC Hyperchannel */
#define AF_APPLETALK 16 /* Apple Talk */
#define AF_ROUTE 17 /* Internal Routing Protocol */
#define AF_LINK 18 /* Link layer interface */
#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */
#define AF_INET6 24 /* IPv6 address family */
#define AF_PACKET 25 /* raw packets */
#define AF_MAX 26
 
/*
* Structure used by kernel to store most
* addresses.
* is called struct osockaddr in 4.4BSD
*/
struct sockaddr {
u_short sa_family; /* address family */
char sa_data[14]; /* up to 14 bytes of direct address */
};
 
/*
* Structure used by kernel to pass protocol
* information in raw sockets.
*/
struct sockproto {
u_short sp_family; /* address family */
u_short sp_protocol; /* protocol */
};
 
/*
* Protocol families, same as address families for now.
*/
#define PF_UNSPEC AF_UNSPEC
#define PF_UNIX AF_UNIX
#define PF_INET AF_INET
#define PF_INET6 AF_INET6
#define PF_IMPLINK AF_IMPLINK
#define PF_PUP AF_PUP
#define PF_CHAOS AF_CHAOS
#define PF_NS AF_NS
#define PF_ISO AF_ISO
#define PF_OSI AF_ISO
#define PF_ECMA AF_ECMA
#define PF_DATAKIT AF_DATAKIT
#define PF_CCITT AF_CCITT
#define PF_SNA AF_SNA
#define PF_DECnet AF_DECnet
#define PF_DLI AF_DLI
#define PF_LAT AF_LAT
#define PF_HYLINK AF_HYLINK
#define PF_APPLETALK AF_APPLETALK
#define PF_ROUTE AF_ROUTE
#define PF_LINK AF_LINK
#define PF_PACKET AF_PACKET
#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */
 
#define PF_MAX AF_MAX
 
/*
* Maximum queue length specifiable by listen.
*/
#define SOMAXCONN 32
#define MSG_OOB 0x1 /* process out-of-band data */
#define MSG_PEEK 0x2 /* peek at incoming message */
#define MSG_DONTROUTE 0x4 /* send without using routing tables */
#define MSG_EOR 0x8 /* data completes record */
#define MSG_TRUNC 0x10 /* data discarded before delivery */
#define MSG_CTRUNC 0x20 /* control data lost before delivery */
#define MSG_WAITALL 0x40 /* wait for full request or error */
 
#define MSG_MAXIOVLEN 16
 
 
/*
* Header for ancillary data objects in msg_control buffer.
* Used for additional information with/about a datagram
* not expressible by flags. The format is a sequence
* of message elements headed by cmsghdr structures.
*/
struct cmsghdr {
u_int cmsg_len; /* data byte count, including hdr */
int cmsg_level; /* originating protocol */
int cmsg_type; /* protocol-specific type */
/* followed by u_char cmsg_data[]; */
};
 
struct msghdr {
char *msg_name; /* Contains an optional address. */
int msg_namelen; /* len of optional address */
struct iovec *msg_iov; /* scatter/gather array. */
int msg_iovlen; /* number of elements in msg_iov */
char *msg_accrights; /* does not apply to IP - not changed */
int msg_accrightslen; /* does not apply to IP */
};
 
/* CMSG_DATA clashes with <wincrypt.h>
*/
#if (defined(WIN32) || defined(_WIN32)) && \
!defined(_WINDOWS_H) && !defined(_INC_WINDOWS) && !defined(__windows_h__)
#error Include <windows.h> before this point.
#endif
 
/* given pointer to struct adatahdr, return pointer to data */
#undef CMSG_DATA
#define CMSG_DATA(cmsg) ((u_char *)((cmsg) + 1))
 
/* given pointer to struct adatahdr, return pointer to next adatahdr */
#define CMSG_NXTHDR(mhdr, cmsg) \
(((caddr_t)(cmsg) + (cmsg)->cmsg_len + sizeof(struct cmsghdr) > \
(mhdr)->msg_control + (mhdr)->msg_controllen) ? \
(struct cmsghdr *)NULL : \
(struct cmsghdr *)((caddr_t)(cmsg) + ALIGN((cmsg)->cmsg_len)))
 
#define CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control)
 
/* "Socket"-level control message types: */
#define SCM_RIGHTS 0x01 /* access rights (array of int) */
 
#include <sys/packoff.h>
 
__BEGIN_DECLS
 
W32_FUNC int W32_CALL accept (int, struct sockaddr *, int *);
W32_FUNC int W32_CALL bind (int, const struct sockaddr *, int);
W32_FUNC int W32_CALL closesocket (int s);
W32_FUNC int W32_CALL connect (int, const struct sockaddr *, int);
W32_FUNC int W32_CALL ioctlsocket (int s, long cmd, char *argp);
W32_FUNC int MS_CDECL fcntlsocket (int s, int cmd, ...);
 
W32_FUNC int W32_CALL getdomainname (char *name, int len);
W32_FUNC int W32_CALL setdomainname (const char *name, int len);
W32_FUNC int W32_CALL gethostname (char *name, int len);
W32_FUNC int W32_CALL sethostname (const char *name, int len);
 
W32_FUNC u_long W32_CALL gethostid (void);
W32_FUNC u_long W32_CALL sethostid (u_long ip);
W32_FUNC int W32_CALL getpeername (int, struct sockaddr *, int *);
W32_FUNC int W32_CALL getsockname (int, struct sockaddr *, int *);
W32_FUNC int W32_CALL getsockopt (int, int, int, void *, int *);
W32_FUNC int W32_CALL listen (int, int);
W32_FUNC int W32_CALL recv (int, void *, int, int);
W32_FUNC int W32_CALL recvfrom (int, void *, int, int, struct sockaddr *, int *);
W32_FUNC int W32_CALL send (int, const void *, int, int);
W32_FUNC int W32_CALL sendto (int, const void *, int, int, const struct sockaddr *, int);
W32_FUNC int W32_CALL setsockopt (int, int, int, const void *, int);
W32_FUNC int W32_CALL shutdown (int, int);
W32_FUNC int W32_CALL socket (int, int, int);
 
__END_DECLS
 
#endif
/pkgnet/watt32/inc/sys/swap.h
0,0 → 1,229
/*!\file sys/swap.h
* Swapping of short/long values.
*/
 
#ifndef __SYS_SWAP_BYTES_H
#define __SYS_SWAP_BYTES_H
 
#ifndef __SYS_W32API_H
#include <sys/w32api.h>
#endif
 
#ifndef __SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
 
#ifndef __NETINET_IN_H
#include <netinet/in.h>
#endif
 
#if defined(__dj_include_netinet_in_h_)
#error "You are using the wrong version of <netinet/in.h>. Ref. point 10 of the INSTALL file"
#endif
 
 
__BEGIN_DECLS
 
#if defined(WIN32) || defined(_WIN32) /* provide some real versions too */
W32_FUNC unsigned short W32_CALL ntohs (unsigned short);
W32_FUNC unsigned short W32_CALL htons (unsigned short);
W32_FUNC unsigned long W32_CALL ntohl (unsigned long);
W32_FUNC unsigned long W32_CALL htonl (unsigned long);
W32_FUNC unsigned long cdecl _w32_intel (unsigned long x);
W32_FUNC unsigned short cdecl _w32_intel16 (unsigned short x);
#endif
 
#undef ntohs
#undef htons
#undef ntohl
#undef htonl
#define ntohs(x) intel16(x)
#define htons(x) intel16(x)
#define ntohl(x) intel(x)
#define htonl(x) intel(x)
 
 
/*
* Hard to believe, but someone uses Watt-32 on a
* Motorola/PowerPC embedded target.
*/
#if defined(BIG_ENDIAN_MACHINE) || defined(USE_BIGENDIAN)
#define intel(x) x
#define intel16(x) x
 
#elif defined(__GNUC__) && !defined(__NO_INLINE__) /* -O0 */
#define intel(x) __ntohl(x)
#define intel16(x) __ntohs(x)
 
/*
* Ripped (and adapted) from <linux/include/asm-386/byteorder.h>
*/
/*@unused@*/ extern __inline__ unsigned long __ntohl (unsigned long x)
{
__asm__ __volatile (
"xchgb %b0, %h0\n\t" /* swap lower bytes */
"rorl $16, %0\n\t" /* swap words */
"xchgb %b0, %h0" /* swap higher bytes */
: "=q" (x) : "0" (x));
return (x);
}
 
/*@unused@*/ extern __inline__ unsigned short __ntohs (unsigned short x)
{
__asm__ __volatile__ (
"xchgb %b0, %h0" /* swap bytes */
: "=q" (x) : "0" (x));
return (x);
}
 
#elif defined(__POCC__) /* PellesC */
#define intel(x) __ntohl(x)
#define intel16(x) __ntohs(x)
 
__declspec(naked) inline unsigned long __fastcall __ntohl (unsigned long x)
{
__asm xchg cl, ch /* 'x' is in ecx */
__asm ror ecx, 16
__asm xchg cl, ch
__asm mov eax, ecx
__asm ret
}
 
__declspec(naked) inline unsigned short __fastcall __ntohs (unsigned short x)
{
__asm xchg cl, ch /* 'x' is in ecx */
__asm movzx eax, cx
__asm ret
}
 
#elif (defined(_MSC_VER) && (_MSC_VER >= 1200)) && /* MSVC 6+ */ \
!defined(__POCC__) /* "pocc -Ze" sets _MSC_VER */
#define intel(x) __ntohl(x)
#define intel16(x) __ntohs(x)
 
__declspec(naked) static unsigned long __ntohl (unsigned long x)
{
__asm mov eax, [esp+4]
__asm xchg al, ah
__asm ror eax, 16
__asm xchg al, ah
__asm ret
}
 
__declspec(naked) static unsigned short __ntohs (unsigned short x)
{
__asm mov ax, [esp+4]
__asm xchg al, ah
__asm ret
}
 
#elif defined(__WATCOMC__) && defined(__FLAT__) /* Watcom 32-bit */
#define intel(x) __ntohl(x)
#define intel16(x) __ntohs(x)
 
extern unsigned long __ntohl (unsigned long x);
#pragma aux __ntohl = \
"xchg al, ah" \
"ror eax, 16" \
"xchg al, ah" \
parm [eax] \
modify [eax];
 
extern unsigned short __ntohs (unsigned short x);
#pragma aux __ntohs = \
"xchg al, ah" \
parm [ax] \
modify [ax];
 
#elif defined(__WATCOMC__) && !defined(__FLAT__) /* Watcom 16-bit */
#define intel(x) __ntohl(x)
#define intel16(x) __ntohs(x)
 
extern unsigned long __ntohl (unsigned long x);
#pragma aux __ntohl = \
"xchg al, dh" \
"xchg ah, dl" \
parm [dx ax] \
modify [dx ax];
 
extern unsigned short __ntohs (unsigned short x);
#pragma aux __ntohs = \
"xchg al, ah" \
parm [ax] \
modify [ax];
 
#elif (defined(__BORLANDC__) && defined(__FLAT__)) || /* bcc32 */ \
(defined(__DMC__) && (__INTSIZE==4)) /* dmc -mx */
#include <dos.h>
 
#define intel(x) __ntohl(x)
#define intel16(x) __ntohs(x)
 
#define __ntohs(x) (_AX = x, \
__emit__(0x86,0xC4), /* xchg al, ah */ \
_AX)
 
#define __ntohl(x) (_EAX = x, \
__emit__(0x86,0xC4), /* xchg al, ah */ \
__emit__(0xC1,0xC8,0x10), /* ror eax, 16 */ \
__emit__(0x86,0xC4), /* xchg al, ah */ \
_EAX)
 
#elif defined(__CCDL__) && defined(__386__) /* LadSoft 386 */
#define intel(x) __ntohl(x)
#define intel16(x) __ntohs(x)
 
static unsigned long __ntohl (unsigned long x)
{
asm { mov eax, [x]
xchg al, ah
ror eax, 16
xchg al, ah
}
return (_EAX);
}
static unsigned short __ntohs (unsigned short x)
{
asm { mov ax, [x]
xchg al, ah
}
return (unsigned short)_EAX; /* doesn't have _AX */
}
 
/* This crashes mysteriously if we use _bswap()
*/
#elif defined(__LCC__) && 0 /* LCC-Win32 */
#define intel(x) __ntohl(x)
#define intel16(x) __ntohs(x)
#if 0
#include <intrinsics.h>
#define W32_LCC_INTRINSICS_INCLUDED /* header guard is missing */
#define __ntohl(x) (unsigned long) _bswap(x)
#define __ntohs(x) ((unsigned short) (_bswap(x) >> 16))
#else
unsigned long inline __declspec(naked) __ntohl (unsigned long x)
{
_asm ("movl (%esp), %eax");
_asm ("xchg %ah, %al");
_asm ("rorl $16, %eax");
_asm ("xchg %ah, %al");
}
unsigned short inline __declspec(naked) __ntohs (unsigned short x)
{
_asm ("movs (%esp), %ax");
_asm ("xchg %ah, %al");
}
#endif
 
#else /* no inlining possible (or worth the effort) */
#define intel W32_NAMESPACE (intel)
#define intel16 W32_NAMESPACE (intel16)
#define WATT_NO_INLINE_INTEL
 
W32_FUNC unsigned long cdecl intel (unsigned long x);
W32_FUNC unsigned short cdecl intel16 (unsigned short x);
#endif
 
__END_DECLS
 
#endif /* __SYS_SWAP_BYTES_H */
/pkgnet/watt32/inc/sys/syslog.h
0,0 → 1,160
/*!\file sys/syslog.h
* syslog() facility.
*/
 
/*
* Copyright (c) 1982, 1986, 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)syslog.h 8.1 (Berkeley) 6/2/93
* $Id: syslog.h,v 1.15 1997/10/06 20:37:01 joerg Exp $
*/
 
#ifndef __SYS_SYSLOG_H
#define __SYS_SYSLOG_H
 
#ifndef _PATH_LOG
#define _PATH_LOG "/var/run/log"
#endif
 
#ifndef _PATH_OLDLOG
#define _PATH_OLDLOG "/dev/log" /* backward compatibility */
#endif
 
/*
* priorities/facilities are encoded into a single 32-bit quantity, where the
* bottom 3 bits are the priority (0-7) and the top 28 bits are the facility
* (0-big number). Both the priorities and the facilities map roughly
* one-to-one to strings in the syslogd(8) source code. This mapping is
* included in this file.
*
* priorities (these are ordered)
*/
#define LOG_EMERG 0 /* system is unusable */
#define LOG_ALERT 1 /* action must be taken immediately */
#define LOG_CRIT 2 /* critical conditions */
#define LOG_ERR 3 /* error conditions */
#define LOG_WARNING 4 /* warning conditions */
#define LOG_NOTICE 5 /* normal but significant condition */
#define LOG_INFO 6 /* informational */
#define LOG_DEBUG 7 /* debug-level messages */
 
#define LOG_PRIMASK 0x07 /* mask to extract priority part (internal) */
/* extract priority */
#define LOG_PRI(p) ((p) & LOG_PRIMASK)
#define LOG_MAKEPRI(fac, pri) ((fac) | (pri))
 
#define INTERNAL_NOPRI 0x10 /* the "no priority" priority */
/* mark "facility" */
#define INTERNAL_MARK LOG_MAKEPRI((LOG_NFACILITIES<<3), 0)
 
typedef struct _code {
unsigned long c_val;
const char *c_name;
} CODE;
 
extern CODE prioritynames[13];
 
/* facility codes */
#define LOG_KERN (0<<3) /* kernel messages */
#define LOG_USER (1<<3) /* random user-level messages */
#define LOG_MAIL (2<<3) /* mail system */
#define LOG_DAEMON (3<<3) /* system daemons */
#define LOG_AUTH (4<<3) /* security/authorization messages */
#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */
#define LOG_LPR (6<<3) /* line printer subsystem */
#define LOG_NEWS (7<<3) /* network news subsystem */
#define LOG_UUCP (8<<3) /* UUCP subsystem */
#define LOG_CRON (9<<3) /* clock daemon */
#define LOG_AUTHPRIV (10<<3) /* security/authorization messages (private) */
/* Facility #10 clashes in DEC UNIX, where */
/* it's defined as LOG_MEGASAFE for AdvFS */
/* event logging. */
#define LOG_FTP (11<<3) /* ftp daemon */
#define LOG_NTP (12<<3) /* NTP subsystem */
 
/* other codes through 15 reserved for system use */
#define LOG_LOCAL0 (16<<3) /* reserved for local use */
#define LOG_LOCAL1 (17<<3) /* reserved for local use */
#define LOG_LOCAL2 (18<<3) /* reserved for local use */
#define LOG_LOCAL3 (19<<3) /* reserved for local use */
#define LOG_LOCAL4 (20<<3) /* reserved for local use */
#define LOG_LOCAL5 (21<<3) /* reserved for local use */
#define LOG_LOCAL6 (22<<3) /* reserved for local use */
#define LOG_LOCAL7 (23<<3) /* reserved for local use */
 
#define LOG_NFACILITIES 24 /* current number of facilities */
#define LOG_FACMASK 0x03f8 /* mask to extract facility part */
/* facility of pri */
#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
 
extern CODE facilitynames[24];
 
/*
* arguments to setlogmask.
*/
#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */
#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
 
/*
* Option flags for openlog.
*
* LOG_ODELAY no longer does anything.
* LOG_NDELAY is the inverse of what it used to be.
*/
#define LOG_PID 0x01 /* log the pid with each message */
#define LOG_CONS 0x02 /* log on the console if errors in sending */
#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
#define LOG_NDELAY 0x08 /* don't delay open */
#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
#define LOG_PERROR 0x20 /* log to stderr as well */
 
#include <stdarg.h>
 
#ifndef __SYS_W32API_H
#include <sys/w32api.h>
#endif
 
#ifndef __SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
 
__BEGIN_DECLS
 
W32_FUNC void closelog (void);
W32_FUNC void openlog (const char *, int, int);
W32_FUNC int setlogmask (int);
W32_FUNC void syslog (int, const char *, ...);
W32_FUNC void vsyslog (int, const char *, va_list);
 
__END_DECLS
 
#endif
/pkgnet/watt32/inc/sys/turboc.err
0,0 → 1,64
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE IS GENERATED BY E:\NET\WATT\UTIL\TCC_ERR.EXE. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 35)
*/
 
#ifndef __TURBOC__
#error This file is only for use by "__TURBOC__"
#endif
 
#define EWOULDBLOCK 36
#define EDEADLK 40
#define ENAMETOOLONG 47
#define ENOLCK 49
#define ENOSYS 51
#define ENOTEMPTY 53
#define EINPROGRESS 61
#define EALREADY 62
#define ENOTSOCK 63
#define EDESTADDRREQ 64
#define EMSGSIZE 65
#define EPROTOTYPE 66
#define ENOPROTOOPT 67
#define EPROTONOSUPPORT 68
#define ESOCKTNOSUPPORT 69
#define EOPNOTSUPP 70
#define EPFNOSUPPORT 71
#define EAFNOSUPPORT 72
#define EADDRINUSE 73
#define EADDRNOTAVAIL 74
#define ENETDOWN 75
#define ENETUNREACH 76
#define ENETRESET 77
#define ECONNABORTED 78
#define ECONNRESET 79
#define ENOBUFS 80
#define EISCONN 81
#define ENOTCONN 82
#define ESHUTDOWN 83
#define ETIMEDOUT 84
#define ECONNREFUSED 85
#define EHOSTDOWN 86
#define EHOSTUNREACH 87
#define ESTALE 88
#define EREMOTE 89
#define EBADRPC 90
#define ERPCMISMATCH 91
#define EPROGUNAVAIL 92
#define EPROGMISMATCH 93
#define EPROCUNAVAIL 94
#define EILSEQ 95
#define EDEADLOCK 96
#define ETOOMANYREFS 100
#define ELOOP 101
#define EPROCLIM 102
#define EUSERS 103
#define EDQUOT 104
#define EVDBAD 105
#define ENORMTWD 106
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/uio.h
0,0 → 1,11
/*!\file sys/uio.h
* Dummy header.
*/
 
#ifndef __SYS_UIO_H
#define __SYS_UIO_H
 
/* This dummy header is required while building e.g. tcpdump
*/
 
#endif
/pkgnet/watt32/inc/sys/visualc.err
0,0 → 1,113
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE WAS GENERATED BY ..\util\vc_err. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 42)
*/
 
#ifndef _MSC_VER
#error This file is only for use by "_MSC_VER"
#endif
 
#define ERRNO_VENDOR_VERSION "12.0"
 
#define EWOULDBLOCK 43
#define EDOM 33
#define ERANGE 34
#define E2BIG 7
#define EACCES 13
#define EAGAIN 11
#define EBADF 9
#define EBUSY 16
#define ECHILD 10
#define EDEADLK 36
#define EEXIST 17
#define EFAULT 14
#define EFBIG 27
#define EINTR 4
#define EINVAL 22
#define EIO 5
#define EISDIR 21
#define EMFILE 24
#define EMLINK 31
#define ENAMETOOLONG 38
#define ENFILE 23
#define ENODEV 19
#define ENOENT 2
#define ENOEXEC 8
#define ENOLCK 39
#define ENOMEM 12
#define ENOSPC 28
#define ENOSYS 40
#define ENOTDIR 20
#define ENOTEMPTY 41
#define ENOTTY 25
#define ENXIO 6
#define EPERM 1
#define EPIPE 32
#define EROFS 30
#define ESPIPE 29
#define ESRCH 3
#define EXDEV 18
#define ENMFILE 44
#define EINPROGRESS 45
#define EALREADY 46
#define ENOTSOCK 47
#define EDESTADDRREQ 48
#define EMSGSIZE 49
#define EPROTOTYPE 50
#define ENOPROTOOPT 51
#define EPROTONOSUPPORT 52
#define ESOCKTNOSUPPORT 53
#define EOPNOTSUPP 54
#define EPFNOSUPPORT 55
#define EAFNOSUPPORT 56
#define EADDRINUSE 57
#define EADDRNOTAVAIL 58
#define ENETDOWN 59
#define ENETUNREACH 60
#define ENETRESET 61
#define ECONNABORTED 62
#define ECONNRESET 63
#define ENOBUFS 64
#define EISCONN 65
#define ENOTCONN 66
#define ESHUTDOWN 67
#define ETIMEDOUT 68
#define ECONNREFUSED 69
#define EHOSTDOWN 70
#define EHOSTUNREACH 71
#define ESTALE 72
#define EREMOTE 73
#define EBADRPC 74
#define ERPCMISMATCH 75
#define EPROGUNAVAIL 76
#define EPROGMISMATCH 77
#define EPROCUNAVAIL 78
#define EILSEQ 42
#define EINVFNC 79
#define ENOPATH 80
#define ECONTR 81
#define EINVMEM 82
#define EINVENV 83
#define EINVFMT 84
#define EINVACC 85
#define EINVDAT 86
#define EDEADLOCK 36
#define ECURDIR 87
#define ENOTSAM 88
#define ETXTBSY 89
#define ENOTBLK 90
#define EUCLEAN 91
#define ETOOMANYREFS 92
#define ELOOP 93
#define EPROCLIM 94
#define EUSERS 95
#define EDQUOT 96
#define EVDBAD 97
#define ENORMTWD 98
#define EOVERFLOW 99
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/w32api.h
0,0 → 1,71
/*!\file sys/w32api.h
*
* Watt-32 API decoration for Win32 targets.
*/
#ifndef __SYS_W32API_H
#define __SYS_W32API_H
 
#if !defined(_WATT32_FAKE_WINSOCK_H) && (defined(_WINSOCK_H) || defined(_WINSOCKAPI_))
#error Never include the real <winsock.h> in Watt-32 programs.
#error Change your include-path so the fake <winsock.h> gets included first.
#endif
 
#if !defined(_WATT32_FAKE_WINSOCK2_H) && (defined(_WINSOCK2_H) || defined(_WINSOCK2API_))
#error Never include the real <winsock2.h> in Watt-32 programs.
#error Change your include-path so the fake <winsock2.h> gets included first.
#endif
 
#if !defined(_WATT32_FAKE_WS2TCPIP_H) && defined(_WS2TCPIP_H)
#error Never include the real <ws2tcpip.h> in Watt-32 programs.
#error Change your include-path so the fake <ws2tcpip.h> gets included first.
#endif
 
#if defined(WIN32) || defined(_WIN32)
/* Don't include the real <winsock*.h> */
#define _WINSOCKAPI_
#define _WINSOCK2API_
#define _WINSOCK_H
#define _WINSOCK2_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#endif
 
/*
* For non-Win32 targets the .\util\mkimp program (a small C-preprocessor)
* is meant to search all headers for W32_FUNC/W32_DATA prefixes. All
* functions with a W32_FUNC prefix will produce an export stub function.
* See dj_dxe.mak. Very experimental at the moment.
*
* Note: only a small subset of the Winsock extensions are implemented in
* watt-32.dll (hardly any WSA*() functions yet).
*/
#if (defined(WIN32) || defined(_WIN32)) && !defined(WATT32_STATIC)
#if defined(WATT32_BUILD)
#define W32_FUNC extern __declspec(dllexport)
#define W32_DATA extern __declspec(dllexport)
#else
#define W32_FUNC extern __declspec(dllimport)
#define W32_DATA extern __declspec(dllimport)
#endif
#else
#define W32_FUNC extern
#define W32_DATA extern
#endif
 
/*
* W32_CALL is *not* defined to `stdcall' due to a bug in MingW's
* linker. This bug prevents a MingW generated WATT-32.DLL from
* being used by e.g. a MSVC program.
* Ref. http://sources.redhat.com/bugzilla/show_bug.cgi?id=351
* (last paragraph)
*/
#if (defined(WIN32) || defined(_WIN32)) && 0
#define W32_CALL __stdcall /* maybe __fastcall instead for MSVC? */
#else
#define W32_CALL
#endif
 
#endif
 
/pkgnet/watt32/inc/sys/watcom.err
0,0 → 1,113
#ifndef __SYS_WERRNO_ERR
#define __SYS_WERRNO_ERR
 
/*
* THIS FILE WAS GENERATED BY E:\NET\WATT\UTIL\WC_ERR.EXE. DO NOT EDIT.
*
* Watt-32 errnos are after vendor's errnos (1 - 41)
*/
 
#ifndef __WATCOMC__
#error This file is only for use by "__WATCOMC__"
#endif
 
#define ERRNO_VENDOR_VERSION "12.40"
 
#define EWOULDBLOCK 42
#define EDOM 13
#define ERANGE 14
#define E2BIG 2
#define EACCES 6
#define EAGAIN 18
#define EBADF 4
#define EBUSY 19
#define ECHILD 17
#define EDEADLK 15
#define EEXIST 7
#define EFAULT 34
#define EFBIG 20
#define EINTR 16
#define EINVAL 9
#define EIO 21
#define EISDIR 22
#define EMFILE 11
#define EMLINK 24
#define ENAMETOOLONG 35
#define ENFILE 10
#define ENODEV 36
#define ENOENT 1
#define ENOEXEC 3
#define ENOLCK 37
#define ENOMEM 5
#define ENOSPC 12
#define ENOSYS 38
#define ENOTDIR 23
#define ENOTEMPTY 39
#define ENOTTY 26
#define ENXIO 27
#define EPERM 28
#define EPIPE 29
#define EROFS 30
#define ESPIPE 31
#define ESRCH 32
#define EXDEV 8
#define ENMFILE 43
#define EINPROGRESS 44
#define EALREADY 45
#define ENOTSOCK 46
#define EDESTADDRREQ 47
#define EMSGSIZE 48
#define EPROTOTYPE 49
#define ENOPROTOOPT 50
#define EPROTONOSUPPORT 51
#define ESOCKTNOSUPPORT 52
#define EOPNOTSUPP 53
#define EPFNOSUPPORT 54
#define EAFNOSUPPORT 55
#define EADDRINUSE 56
#define EADDRNOTAVAIL 57
#define ENETDOWN 58
#define ENETUNREACH 59
#define ENETRESET 60
#define ECONNABORTED 61
#define ECONNRESET 62
#define ENOBUFS 63
#define EISCONN 64
#define ENOTCONN 65
#define ESHUTDOWN 66
#define ETIMEDOUT 67
#define ECONNREFUSED 68
#define EHOSTDOWN 69
#define EHOSTUNREACH 70
#define ESTALE 71
#define EREMOTE 72
#define EBADRPC 73
#define ERPCMISMATCH 74
#define EPROGUNAVAIL 75
#define EPROGMISMATCH 76
#define EPROCUNAVAIL 77
#define EILSEQ 40
#define EINVFNC 78
#define ENOPATH 79
#define ECONTR 80
#define EINVMEM 81
#define EINVENV 82
#define EINVFMT 83
#define EINVACC 84
#define EINVDAT 85
#define EDEADLOCK 15
#define ECURDIR 86
#define ENOTSAM 87
#define ETXTBSY 33
#define ENOTBLK 25
#define EUCLEAN 88
#define ETOOMANYREFS 89
#define ELOOP 90
#define EPROCLIM 91
#define EUSERS 92
#define EDQUOT 93
#define EVDBAD 94
#define ENORMTWD 95
#define EOVERFLOW 96
 
#endif /* __SYS_WERRNO_ERR */
/pkgnet/watt32/inc/sys/werrno.h
0,0 → 1,141
/*!\file sys/werrno.h
*
* sys_errlist[] and errno's for compilers with limited errnos.
* For WIN32, we do NOT use the <winsock.h> WSAE* codes.
*
* G. Vanem <giva@bgnett.no> 1998 - 2004
*/
 
#ifndef __SYS_WERRNO_H
#define __SYS_WERRNO_H
 
/* When doing "gcc -MM" with gcc 3.0 we must include <sys/version.h>
* (via stdio.h) in order for __DJGPP__ to be defined
*/
#include <stdio.h>
#include <errno.h>
 
#ifndef __SYS_W32API_H
#include <sys/w32api.h>
#endif
 
/* Hack: fix for compiling with djgpp 2.04, but
* ./util/dj_err.exe was compiled with 2.03
*/
#if defined(MIXING_DJGPP_203_AND_204)
#undef ELOOP
#endif
 
#if defined(__MINGW32__)
#include <sys/mingw32.err>
 
#elif defined(__HIGHC__)
#undef EDEADLK
#undef EDEADLOCK
#include <sys/highc.err>
 
#elif defined(__BORLANDC__)
#ifdef __FLAT__
#undef ENAMETOOLONG /* bcc32 4.0 */
#endif
#ifdef _WIN32
#undef ENOTEMPTY
#endif
#include <sys/borlandc.err>
 
#elif defined(__TURBOC__)
#include <sys/turboc.err>
 
#elif defined(__WATCOMC__)
#include <sys/watcom.err>
 
#elif defined(__DJGPP__)
#include <sys/djgpp.err>
 
#elif defined(__DMC__) /* Digital Mars Compiler */
#include <sys/digmars.err>
 
#elif defined(_MSC_VER) && (_MSC_VER <= 800) /* MSC 8.0 or older */
#include <sys/quickc.err>
 
#elif defined(_MSC_VER) && (_MSC_VER > 800) /* Visual C on Windows */
#undef EDEADLOCK
#include <sys/visualc.err>
 
#elif defined(__CCDL__) /* LadSoft's cc386.exe */
#include <sys/ladsoft.err>
 
#elif defined(__LCC__)
#include <sys/lcc.err>
 
#elif defined(__POCC__)
#include <sys/pellesc.err>
 
#else
#error Unknown target in <sys/werrno.h>.
#endif
 
/*
* Ugly hack ahead. Someone tell me a better way, but
* errno and friends are macros on Windows. Redefine them
* to point to our variables.
*
* On Windows, the usual 'errno' is a macro "(*_errno)()" that
* is problematic to use as a lvalue.
* On other platforms we modify the global 'errno' variable directly.
* (see SOCK_ERRNO() in misc.h). So no need to redefine it in any way.
*/
 
W32_DATA int _w32_errno;
W32_DATA int _w32_sys_nerr;
W32_DATA char *_w32_sys_errlist[];
 
#if 0
#undef sys_nerr
#define sys_nerr _w32_sys_nerr
 
#undef _sys_nerr
#define _sys_nerr _w32_sys_nerr
 
#undef __sys_nerr
#define __sys_nerr _w32_sys_nerr
 
#undef sys_errlist
#define sys_errlist _w32_sys_errlist
 
#undef _sys_errlist
#define _sys_errlist _w32_sys_errlist
 
#undef __sys_errlist
#define __sys_errlist _w32_sys_errlist
#endif
 
/*
* Incase you have trouble with duplicate defined symbols,
* make sure the "*_s()" versions are referenced before normal
* perror() and strerror() in your C-library.
*/
W32_FUNC void perror_s (const char *str);
W32_FUNC char *strerror_s (int errnum);
 
#if defined(__cplusplus) /* Damn C++ */
#include <stdlib.h>
#include <string.h>
 
#elif !defined(_MSC_VER) && !defined(WIN32)
#if !defined(_INC_STDLIB) && !defined(_STDLIB_H_) && !defined(_STDIO_H)
W32_FUNC void perror (const char *str);
#endif
 
#if !defined(_INC_STRING) && !defined(_STRING_H) && !defined(_STRING_H_)
W32_FUNC char *strerror (int errnum);
#endif
#endif
 
#if defined(WIN32) || defined(_WIN32)
W32_FUNC int __stdcall WSAGetLastError (void);
W32_FUNC void __stdcall WSASetLastError (int err);
#endif
 
#endif /* __SYS_WERRNO_H */
 
/pkgnet/watt32/inc/sys/wtime.h
0,0 → 1,112
/*!\file sys/wtime.h
*
* Watt-32 time functions.
*/
 
#ifndef __SYS_WTIME_H
#define __SYS_WTIME_H
 
/*
* The naming <sys/wtime.h> is required for those compilers that
* have <sys/time.h> in the usual place but doesn't define
* the following.
*/
 
#include <time.h>
 
#ifdef __BORLANDC__
#undef timezone /* a macro in bcc 5+ */
#endif
 
#ifndef __SYS_W32API_H
#include <sys/w32api.h>
#endif
 
#ifndef __SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
 
#if defined(__DJGPP__)
#include <sys/time.h>
#include <sys/times.h>
 
#elif defined(__MINGW32__)
#include <sys/time.h>
 
#else
struct timeval {
time_t tv_sec;
long tv_usec;
};
#define STRUCT_TIMEVAL_DEFINED
#endif
 
#if !defined(__DJGPP__)
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
 
struct tms {
unsigned long tms_utime;
unsigned long tms_cstime;
unsigned long tms_cutime;
unsigned long tms_stime;
};
#define STRUCT_TIMEZONE_DEFINED
#define STRUCT_TMS_DEFINED
 
__BEGIN_DECLS
 
#define ITIMER_REAL 0
#define ITIMER_PROF 1
 
struct itimerval {
struct timeval it_interval; /* timer interval */
struct timeval it_value; /* current value */
};
 
W32_FUNC int getitimer (int, struct itimerval *);
W32_FUNC int setitimer (int, struct itimerval *, struct itimerval *);
 
W32_FUNC int gettimeofday (struct timeval *tp, struct timezone *tz);
 
__END_DECLS
 
#endif /* !__DJGPP__ */
 
#if !defined(_STRUCT_TIMESPEC) && !defined(_pthread_signal_h)
#define _STRUCT_TIMESPEC
struct timespec {
time_t tv_sec;
long tv_nsec;
};
#endif
 
#ifndef HZ
#define HZ 18.2F
#endif
 
__BEGIN_DECLS
 
W32_FUNC unsigned long net_times (struct tms *buffer);
W32_FUNC int gettimeofday2 (struct timeval *tv, struct timezone *tz);
 
__END_DECLS
 
/*
* Operations on timevals.
*
* NB: timercmp does not work for >= or <=.
*/
#ifndef timerisset
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
 
#define timercmp(tvp, uvp, cmp) ((tvp)->tv_sec cmp (uvp)->tv_sec || \
((tvp)->tv_sec == (uvp)->tv_sec && \
(tvp)->tv_usec cmp (uvp)->tv_usec))
 
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#endif
 
#endif /* !__SYS_WTIME_H */
/pkgnet/watt32/inc/sys/wtypes.h
0,0 → 1,200
/*!\file sys/wtypes.h
* Watt-32 type definitions.
*/
 
/*-
* Copyright (c) 1982, 1986, 1991 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)types.h 7.17 (Berkeley) 5/6/91
* @(#)wtypes.h Waterloo TCP/IP
*/
 
/*
* the naming <sys/wtypes.h> is required for those compilers that
* have <sys/types.h> in the usual place but doesn't define
* the following types. This file is included from <sys/socket.h>,
* <tcp.h> etc.
*/
 
#ifndef __SYS_WTYPES_H
#define __SYS_WTYPES_H
 
#if 0 /* No, that causes trouble */
#undef FD_SETSIZE
#define FD_SETSIZE 512 /* use same FD_SETSIZE for all targets */
#endif
 
#if defined(__DJGPP__) || defined(__DMC__) || defined(__MINGW32__) || defined(__POCC__)
#include <sys/types.h>
#endif
 
#if defined(__DJGPP__)
#include <machine/endian.h>
#endif
 
#if defined(__MINGW32__) || (defined(__DJGPP__) && DJGPP_MINOR >= 4) || \
(defined(__WATCOMC__) && __WATCOMC__ >= 1230) || /* OW 1.3+ */ \
defined(__POCC__) /* PellesC */
#undef HAVE_STDINT_H
#define HAVE_STDINT_H
#include <stdint.h> /* doesn't define 'u_char' etc. */
#endif
 
 
#if !defined(HAVE_U_INT64_T) && !defined(u_int64_t)
#if defined(__HIGHC__) || defined(__GNUC__)
typedef unsigned long long u_int64_t;
#define HAVE_U_INT64_T
 
#elif defined(__DMC__) && (__INTSIZE == 4)
typedef unsigned long long u_int64_t;
#define HAVE_U_INT64_T
 
#elif defined(__WATCOMC__) && defined(__WATCOM_INT64__)
typedef unsigned __int64 u_int64_t;
#define HAVE_U_INT64_T
 
#elif (defined(_MSC_VER) && (_MSC_VER >= 900)) || defined(__POCC__)
typedef unsigned __int64 u_int64_t;
#define HAVE_U_INT64_T
#endif
#endif
 
#if !defined(__GLIBC__)
#if !defined(HAVE_U_CHAR) && !defined(u_char)
typedef unsigned char u_char;
#define HAVE_U_CHAR
#endif
 
#if !defined(HAVE_U_SHORT) && !defined(u_short)
typedef unsigned short u_short;
#define HAVE_U_SHORT
#endif
 
#if !defined(HAVE_USHORT) && !defined(ushort)
typedef unsigned short ushort; /* SysV compatibility */
#define HAVE_USHORT
#endif
 
#if !defined(HAVE_U_LONG) && !defined(u_long)
typedef unsigned long u_long;
#define HAVE_U_LONG
#endif
 
#if !defined(HAVE_U_INT) && !defined(u_int)
#if defined(__SMALL__) || defined(__LARGE__)
typedef unsigned long u_int; /* too many headers assumes u_int is >=32-bit */
#else
typedef unsigned int u_int;
#endif
#define HAVE_U_INT
#endif
 
#if !defined(HAVE_CADDR_T) && !defined(caddr_t)
typedef unsigned long caddr_t;
#define HAVE_CADDR_T
#endif
#endif
 
#if !defined(HAVE_U_INT8_T) && !defined(u_int8_t)
typedef unsigned char u_int8_t;
#endif
 
#if !defined(HAVE_U_INT16_T) && !defined(u_int16_t)
typedef unsigned short u_int16_t;
#endif
 
#if !defined(HAVE_U_INT32_T) && !defined(u_int32_t)
typedef unsigned long u_int32_t;
#endif
 
#if !defined(HAVE_STDINT_H)
#if !defined(HAVE_INT16_T) && !defined(int16_t)
typedef short int16_t;
#define HAVE_INT16_T
#endif
 
#if !defined(HAVE_INT32_T) && !defined(int32_t)
typedef long int32_t;
#define HAVE_INT32_T
#endif
#endif
 
#if !defined(HAVE_U_QUAD_T) && !defined(u_quad_t)
#define HAVE_U_QUAD_T
#ifdef HAVE_U_INT64_T
#define u_quad_t u_int64_t
#else
#define u_quad_t unsigned long
#endif
#endif
 
#if !defined(IOVEC_DEFINED)
#define IOVEC_DEFINED
struct iovec {
void *iov_base;
int iov_len;
};
#endif
 
 
#define __BIT_TYPES_DEFINED__
 
#if !defined(FD_SET) /* not djgpp */
 
#undef FD_SETSIZE
#define FD_SETSIZE 512
#define FD_SET(n, p) ((p)->fd_bits[(n)/8] |= (1 << ((n) & 7)))
#define FD_CLR(n, p) ((p)->fd_bits[(n)/8] &= ~(1 << ((n) & 7)))
#define FD_ISSET(n,p) ((p)->fd_bits[(n)/8] & (1 << ((n) & 7)))
#define FD_ZERO(p) memset ((void*)(p), 0, sizeof(*(p)))
 
typedef struct fd_set {
unsigned char fd_bits [(FD_SETSIZE+7)/8];
} fd_set;
#endif
 
#ifndef LITTLE_ENDIAN
#define LITTLE_ENDIAN 1234
#endif
 
#ifndef BIG_ENDIAN
#define BIG_ENDIAN 4321
#endif
 
#if defined(BIG_ENDIAN_MACHINE) || defined(USE_BIGENDIAN)
#define BYTE_ORDER BIG_ENDIAN
#else
#define BYTE_ORDER LITTLE_ENDIAN
#endif
 
#endif