Intial commit
This commit is contained in:
56
tcl-dp/unix/compat/in.h
Normal file
56
tcl-dp/unix/compat/in.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*These definitions are required by the IPmulticast code. Some systems do not*/
|
||||
/* have these definitions in their netinet/in.h file.*/
|
||||
|
||||
#ifndef IN_CLASSD_NET
|
||||
#define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */
|
||||
#endif
|
||||
|
||||
#ifndef IN_CLASSD_NSHIFT
|
||||
#define IN_CLASSD_NSHIFT 28 /* net and host fields, but */
|
||||
#endif
|
||||
|
||||
#ifndef IN_CLASSD_HOST
|
||||
#define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */
|
||||
#endif
|
||||
|
||||
#ifndef INADDR_UNSPEC_GROUP
|
||||
#define INADDR_UNSPEC_GROUP (u_long)0xe0000000 /* 224.0.0.0 */
|
||||
#endif
|
||||
|
||||
#ifndef INADDR_ALLHOSTS_GROUP
|
||||
#define INADDR_ALLHOSTS_GROUP (u_long)0xe0000001 /* 224.0.0.1 */
|
||||
#endif
|
||||
|
||||
#ifndef INADDR_MAX_LOCAL_GROUP
|
||||
#define INADDR_MAX_LOCAL_GROUP (u_long)0xe00000ff /* 224.0.0.255 */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Options for use with [gs]etsockopt at the IP level.
|
||||
*/
|
||||
|
||||
#ifndef IP_OPTIONS
|
||||
#define IP_OPTIONS 1 /* set/get IP per-packet options */
|
||||
#endif
|
||||
|
||||
#ifndef IP_MULTICAST_IF
|
||||
|
||||
#define IP_MULTICAST_IF 2 /* set/get IP multicast interface */
|
||||
#define IP_MULTICAST_TTL 3 /* set/get IP multicast timetolive */
|
||||
#define IP_MULTICAST_LOOP 4 /* set/get IP multicast loopback */
|
||||
#define IP_ADD_MEMBERSHIP 5 /* add an IP group membership */
|
||||
#define IP_DROP_MEMBERSHIP 6 /* drop an IP group membership */
|
||||
#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */
|
||||
#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */
|
||||
#define IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */
|
||||
|
||||
/*
|
||||
* Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
|
||||
*/
|
||||
struct ip_mreq {
|
||||
struct in_addr imr_multiaddr; /* IP multicast address of group */
|
||||
struct in_addr imr_interface; /* local IP address of interface */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
43
tcl-dp/unix/compat/malloc.h
Normal file
43
tcl-dp/unix/compat/malloc.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* malloc.h --
|
||||
*
|
||||
* Declares facilities exported by the "malloc" portion of
|
||||
* the C library. This file isn't complete in the ANSI-C
|
||||
* sense; it only declares things that are needed by Tcl-DP.
|
||||
*
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, without written agreement and without
|
||||
* license or royalty fees, to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose, provided that the
|
||||
* above copyright notice and the following two paragraphs appear in
|
||||
* all copies of this software.
|
||||
*
|
||||
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
|
||||
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
|
||||
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
|
||||
* CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
||||
* ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
|
||||
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*
|
||||
* /usr/u/multimed/cmt/CVSROOT/tcl-dp/compat/malloc.h,v 1.2 1995/04/01 20:37:36 grafton Exp SPRITE (Berkeley)
|
||||
*/
|
||||
|
||||
#ifndef _MALLOC
|
||||
#define _MALLOC
|
||||
|
||||
#include <tcl.h>
|
||||
|
||||
extern void free _ANSI_ARGS_((void *));
|
||||
extern void *malloc _ANSI_ARGS_((int));
|
||||
extern void *calloc _ANSI_ARGS_((int, int));
|
||||
extern void *realloc _ANSI_ARGS_((void *, int));
|
||||
|
||||
#endif /* _MALLOC */
|
||||
|
||||
|
||||
60
tcl-dp/unix/compat/stdlib.h
Normal file
60
tcl-dp/unix/compat/stdlib.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* stdlib.h --
|
||||
*
|
||||
* Declares facilities exported by the "stdlib" portion of
|
||||
* the C library. This file isn't complete in the ANSI-C
|
||||
* sense; it only declares things that are needed by Tcl.
|
||||
* This file is needed even on many systems with their own
|
||||
* stdlib.h (e.g. SunOS) because not all stdlib.h files
|
||||
* declare all the procedures needed here (such as strtod).
|
||||
*
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, without written agreement and without
|
||||
* license or royalty fees, to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose, provided that the
|
||||
* above copyright notice and the following two paragraphs appear in
|
||||
* all copies of this software.
|
||||
*
|
||||
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
|
||||
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
|
||||
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
|
||||
* CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
||||
* ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
|
||||
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*
|
||||
* /usr/u/multimed/cmt/CVSROOT/tcl-dp/compat/stdlib.h,v 1.3 1995/05/24 18:00:00 bsmith Exp SPRITE (Berkeley)
|
||||
*/
|
||||
|
||||
#ifndef _STDLIB
|
||||
#define _STDLIB
|
||||
|
||||
#include <tcl.h>
|
||||
|
||||
extern void abort _ANSI_ARGS_((void));
|
||||
extern double atof _ANSI_ARGS_((CONST char *string));
|
||||
extern int atoi _ANSI_ARGS_((CONST char *string));
|
||||
extern long atol _ANSI_ARGS_((CONST char *string));
|
||||
extern void exit _ANSI_ARGS_((int status));
|
||||
extern char * getenv _ANSI_ARGS_((CONST char *name));
|
||||
extern void qsort _ANSI_ARGS_((VOID *base, int n, int size,
|
||||
int (*compar)(CONST VOID *element1, CONST VOID
|
||||
*element2)));
|
||||
extern double strtod _ANSI_ARGS_((CONST char *string, char **endPtr));
|
||||
extern long strtol _ANSI_ARGS_((CONST char *string, char **endPtr,
|
||||
int base));
|
||||
extern unsigned long strtoul _ANSI_ARGS_((CONST char *string,
|
||||
char **endPtr, int base));
|
||||
extern char * calloc _ANSI_ARGS_((int n, int size));
|
||||
extern char * malloc _ANSI_ARGS_((int size));
|
||||
extern char * realloc _ANSI_ARGS_((void *ptr, int size));
|
||||
|
||||
|
||||
#endif /* _STDLIB */
|
||||
|
||||
|
||||
80
tcl-dp/unix/compat/string.h
Normal file
80
tcl-dp/unix/compat/string.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* string.h --
|
||||
*
|
||||
* Declarations of ANSI C library procedures for string handling.
|
||||
*
|
||||
* Copyright (c) 1991-1993 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, without written agreement and without
|
||||
* license or royalty fees, to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose, provided that the
|
||||
* above copyright notice and the following two paragraphs appear in
|
||||
* all copies of this software.
|
||||
*
|
||||
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
|
||||
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
|
||||
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
|
||||
* CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
||||
* ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
|
||||
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*
|
||||
* /usr/u/multimed/cmt/CVSROOT/tcl-dp/compat/string.h,v 1.2 1995/04/01 20:37:39 grafton Exp SPRITE (Berkeley)
|
||||
*/
|
||||
|
||||
#ifndef _STRING
|
||||
#define _STRING
|
||||
|
||||
#include <tcl.h>
|
||||
|
||||
/*
|
||||
* The following #include is needed to define size_t. (This used to
|
||||
* include sys/stdtypes.h but that doesn't exist on older versions
|
||||
* of SunOS, e.g. 4.0.2, so I'm trying sys/types.h now.... hopefully
|
||||
* it exists everywhere)
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
extern char * memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n));
|
||||
extern int memcmp _ANSI_ARGS_((CONST VOID *s1, CONST VOID *s2,
|
||||
size_t n));
|
||||
extern char * memcpy _ANSI_ARGS_((VOID *t, CONST VOID *f, size_t n));
|
||||
extern char * memmove _ANSI_ARGS_((VOID *t, CONST VOID *f,
|
||||
size_t n));
|
||||
extern char * memset _ANSI_ARGS_((VOID *s, int c, size_t n));
|
||||
|
||||
extern int strcasecmp _ANSI_ARGS_((CONST char *s1,
|
||||
CONST char *s2));
|
||||
extern char * strcat _ANSI_ARGS_((char *dst, CONST char *src));
|
||||
extern char * strchr _ANSI_ARGS_((CONST char *string, int c));
|
||||
extern int strcmp _ANSI_ARGS_((CONST char *s1, CONST char *s2));
|
||||
extern char * strcpy _ANSI_ARGS_((char *dst, CONST char *src));
|
||||
extern size_t strcspn _ANSI_ARGS_((CONST char *string,
|
||||
CONST char *chars));
|
||||
extern char * strdup _ANSI_ARGS_((CONST char *string));
|
||||
extern char * strerror _ANSI_ARGS_((int error));
|
||||
extern size_t strlen _ANSI_ARGS_((CONST char *string));
|
||||
extern int strncasecmp _ANSI_ARGS_((CONST char *s1,
|
||||
CONST char *s2, size_t n));
|
||||
extern char * strncat _ANSI_ARGS_((char *dst, CONST char *src,
|
||||
size_t numChars));
|
||||
extern int strncmp _ANSI_ARGS_((CONST char *s1, CONST char *s2,
|
||||
size_t nChars));
|
||||
extern char * strncpy _ANSI_ARGS_((char *dst, CONST char *src,
|
||||
size_t numChars));
|
||||
extern char * strpbrk _ANSI_ARGS_((CONST char *string, char *chars));
|
||||
extern char * strrchr _ANSI_ARGS_((CONST char *string, int c));
|
||||
extern size_t strspn _ANSI_ARGS_((CONST char *string,
|
||||
CONST char *chars));
|
||||
extern char * strstr _ANSI_ARGS_((CONST char *string,
|
||||
CONST char *substring));
|
||||
extern char * strtok _ANSI_ARGS_((CONST char *s, CONST char *delim));
|
||||
|
||||
#endif /* _STRING */
|
||||
|
||||
|
||||
85
tcl-dp/unix/compat/unistd.h
Normal file
85
tcl-dp/unix/compat/unistd.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* unistd.h --
|
||||
*
|
||||
* Macros, CONSTants and prototypes for Posix conformance.
|
||||
*
|
||||
* Copyright 1989 Regents of the University of California
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies. The University of California
|
||||
* makes no representations about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without
|
||||
* express or implied warranty.
|
||||
*
|
||||
* /usr/u/multimed/cmt/CVSROOT/tcl-dp/compat/unistd.h,v 1.2 1995/04/01 20:37:41 grafton Exp
|
||||
*/
|
||||
|
||||
#ifndef _UNISTD
|
||||
#define _UNISTD
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifndef _TCL
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Strict POSIX stuff goes here. Extensions go down below, in the
|
||||
* ifndef _POSIX_SOURCE section.
|
||||
*/
|
||||
|
||||
extern void _exit _ANSI_ARGS_((int status));
|
||||
extern int access _ANSI_ARGS_((CONST char *path, int mode));
|
||||
extern int chdir _ANSI_ARGS_((CONST char *path));
|
||||
extern int chown _ANSI_ARGS_((CONST char *path, uid_t owner, gid_t group));
|
||||
extern int close _ANSI_ARGS_((int fd));
|
||||
extern int dup _ANSI_ARGS_((int oldfd));
|
||||
extern int dup2 _ANSI_ARGS_((int oldfd, int newfd));
|
||||
extern int execl _ANSI_ARGS_((CONST char *path, ...));
|
||||
extern int execle _ANSI_ARGS_((CONST char *path, ...));
|
||||
extern int execlp _ANSI_ARGS_((CONST char *file, ...));
|
||||
extern int execv _ANSI_ARGS_((CONST char *path, char **argv));
|
||||
extern int execve _ANSI_ARGS_((CONST char *path, char **argv, char **envp));
|
||||
extern int execvp _ANSI_ARGS_((CONST char *file, char **argv));
|
||||
extern pid_t fork _ANSI_ARGS_((void));
|
||||
extern char *getcwd _ANSI_ARGS_((char *buf, size_t size));
|
||||
extern gid_t getegid _ANSI_ARGS_((void));
|
||||
extern uid_t geteuid _ANSI_ARGS_((void));
|
||||
extern gid_t getgid _ANSI_ARGS_((void));
|
||||
extern int getgroups _ANSI_ARGS_((int bufSize, int *buffer));
|
||||
extern pid_t getpid _ANSI_ARGS_((void));
|
||||
extern uid_t getuid _ANSI_ARGS_((void));
|
||||
extern int isatty _ANSI_ARGS_((int fd));
|
||||
extern long lseek _ANSI_ARGS_((int fd, long offset, int whence));
|
||||
extern int pipe _ANSI_ARGS_((int *fildes));
|
||||
extern int read _ANSI_ARGS_((int fd, char *buf, size_t size));
|
||||
extern int setgid _ANSI_ARGS_((gid_t group));
|
||||
extern int setuid _ANSI_ARGS_((uid_t user));
|
||||
extern unsigned sleep _ANSI_ARGS_ ((unsigned seconds));
|
||||
extern char *ttyname _ANSI_ARGS_((int fd));
|
||||
extern int unlink _ANSI_ARGS_((CONST char *path));
|
||||
extern int write _ANSI_ARGS_((int fd, CONST char *buf, size_t size));
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
extern char *crypt _ANSI_ARGS_((CONST char *, CONST char *));
|
||||
extern int fchown _ANSI_ARGS_((int fd, uid_t owner, gid_t group));
|
||||
extern int flock _ANSI_ARGS_((int fd, int operation));
|
||||
extern int ftruncate _ANSI_ARGS_((int fd, unsigned long length));
|
||||
extern int readlink _ANSI_ARGS_((CONST char *path, char *buf, int bufsize));
|
||||
extern int setegid _ANSI_ARGS_((gid_t group));
|
||||
extern int seteuid _ANSI_ARGS_((uid_t user));
|
||||
extern int setreuid _ANSI_ARGS_((int ruid, int euid));
|
||||
extern int symlink _ANSI_ARGS_((CONST char *, CONST char *));
|
||||
extern int ttyslot _ANSI_ARGS_((void));
|
||||
extern int truncate _ANSI_ARGS_((CONST char *path, unsigned long length));
|
||||
extern int vfork _ANSI_ARGS_((void));
|
||||
#endif /* _POSIX_SOURCE */
|
||||
|
||||
#endif /* _UNISTD */
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user