summaryrefslogtreecommitdiff
path: root/include/mach
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-06-21 18:33:40 +0000
committerThomas Bushnell <thomas@gnu.org>1999-06-21 18:33:40 +0000
commit3910feff8e7beda85d54cdb011a92574430cbb03 (patch)
tree0a6d1d4de15297f1f33ee530069f08e26265d3af /include/mach
parent11debf0c05652827d66e4bab1d5936ee3059846d (diff)
Delete old files from Utah Mach4 that we aren't using.
Diffstat (limited to 'include/mach')
-rw-r--r--include/mach/cthreads.h424
-rw-r--r--include/mach/errorlib.h69
-rw-r--r--include/mach/flick_mach3.h75
-rw-r--r--include/mach/flick_mach3_glue.h218
-rw-r--r--include/mach/flick_mach3mig_glue.h449
-rw-r--r--include/mach/lmm.h60
-rw-r--r--include/mach/sa/a.out.h28
-rw-r--r--include/mach/sa/alloca.h25
-rw-r--r--include/mach/sa/assert.h44
-rw-r--r--include/mach/sa/ctype.h59
-rw-r--r--include/mach/sa/errno.h98
-rw-r--r--include/mach/sa/fcntl.h22
-rw-r--r--include/mach/sa/limits.h32
-rw-r--r--include/mach/sa/malloc.h51
-rw-r--r--include/mach/sa/memory.h25
-rw-r--r--include/mach/sa/stddef.h24
-rw-r--r--include/mach/sa/stdio.h72
-rw-r--r--include/mach/sa/stdlib.h56
-rw-r--r--include/mach/sa/string.h56
-rw-r--r--include/mach/sa/strings.h28
-rw-r--r--include/mach/sa/sys/cdefs.h48
-rw-r--r--include/mach/sa/sys/ioctl.h52
-rw-r--r--include/mach/sa/sys/mman.h41
-rw-r--r--include/mach/sa/sys/reboot.h123
-rw-r--r--include/mach/sa/sys/signal.h206
-rw-r--r--include/mach/sa/sys/stat.h126
-rw-r--r--include/mach/sa/sys/termios.h207
-rw-r--r--include/mach/sa/sys/time.h53
-rw-r--r--include/mach/sa/sys/types.h91
-rw-r--r--include/mach/sa/time.h26
-rw-r--r--include/mach/sa/unistd.h18
31 files changed, 0 insertions, 2906 deletions
diff --git a/include/mach/cthreads.h b/include/mach/cthreads.h
deleted file mode 100644
index d44fa20..0000000
--- a/include/mach/cthreads.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1993,1992,1991,1990,1989 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-/*
- * File: cthreads.h
- * Author: Eric Cooper, Carnegie Mellon University
- * Date: Jul, 1987
- *
- * Definitions for the C Threads package.
- *
- */
-
-
-#ifndef _CTHREADS_
-#define _CTHREADS_ 1
-
-#include <mach/machine/cthreads.h>
-#include <mach.h>
-#include <mach/macro_help.h>
-#include <mach/machine/vm_param.h>
-
-#ifdef __STDC__
-extern void *malloc();
-#else
-extern char *malloc();
-#endif
-
-typedef void *any_t; /* XXX - obsolete, should be deleted. */
-
-#if defined(TRUE)
-#else /* not defined(TRUE) */
-#define TRUE 1
-#define FALSE 0
-#endif
-
-/*
- * C Threads package initialization.
- */
-
-extern vm_offset_t cthread_init(void);
-
-
-/*
- * Queues.
- */
-typedef struct cthread_queue {
- struct cthread_queue_item *head;
- struct cthread_queue_item *tail;
-} *cthread_queue_t;
-
-typedef struct cthread_queue_item {
- struct cthread_queue_item *next;
-} *cthread_queue_item_t;
-
-#define NO_QUEUE_ITEM ((cthread_queue_item_t) 0)
-
-#define QUEUE_INITIALIZER { NO_QUEUE_ITEM, NO_QUEUE_ITEM }
-
-#define cthread_queue_alloc() ((cthread_queue_t) calloc(1, sizeof(struct cthread_queue)))
-#define cthread_queue_init(q) ((q)->head = (q)->tail = 0)
-#define cthread_queue_free(q) free((q))
-
-#define cthread_queue_enq(q, x) \
- MACRO_BEGIN \
- (x)->next = 0; \
- if ((q)->tail == 0) \
- (q)->head = (cthread_queue_item_t) (x); \
- else \
- (q)->tail->next = (cthread_queue_item_t) (x); \
- (q)->tail = (cthread_queue_item_t) (x); \
- MACRO_END
-
-#define cthread_queue_preq(q, x) \
- MACRO_BEGIN \
- if ((q)->tail == 0) \
- (q)->tail = (cthread_queue_item_t) (x); \
- ((cthread_queue_item_t) (x))->next = (q)->head; \
- (q)->head = (cthread_queue_item_t) (x); \
- MACRO_END
-
-#define cthread_queue_head(q, t) ((t) ((q)->head))
-
-#define cthread_queue_deq(q, t, x) \
- MACRO_BEGIN \
- if (((x) = (t) ((q)->head)) != 0 && \
- ((q)->head = (cthread_queue_item_t) ((x)->next)) == 0) \
- (q)->tail = 0; \
- MACRO_END
-
-#define cthread_queue_map(q, t, f) \
- MACRO_BEGIN \
- register cthread_queue_item_t x, next; \
- for (x = (cthread_queue_item_t) ((q)->head); x != 0; x = next){\
- next = x->next; \
- (*(f))((t) x); \
- } \
- MACRO_END
-
-/*
- * Spin locks.
- */
-extern void spin_lock_solid(spin_lock_t *_lock);
-
-#if defined(spin_unlock)
-#else /* not defined(spin_unlock) */
-extern void spin_unlock(spin_lock_t *_lock);
-#endif
-
-#if defined(spin_try_lock)
-#else /* not defined(spin_try_lock) */
-extern boolean_t spin_try_lock(spin_lock_t *_lock);
-#endif
-
-#define spin_lock(p) \
- MACRO_BEGIN \
- if (!spin_try_lock(p)) { \
- spin_lock_solid(p); \
- } \
- MACRO_END
-
-/*
- * Mutex objects.
- */
-typedef struct mutex {
- spin_lock_t lock;
- const char *name;
- struct cthread_queue queue;
- spin_lock_t held;
- /* holder is for WAIT_DEBUG. Not ifdeffed to keep size constant. */
- struct cthread *holder;
-} *mutex_t;
-
-#define MUTEX_INITIALIZER { SPIN_LOCK_INITIALIZER, 0, QUEUE_INITIALIZER, SPIN_LOCK_INITIALIZER}
-#define MUTEX_NAMED_INITIALIZER(Name) { SPIN_LOCK_INITIALIZER, Name, QUEUE_INITIALIZER, SPIN_LOCK_INITIALIZER}
-
-#ifdef WAIT_DEBUG
-#define mutex_set_holder(m,h) ((m)->holder = (h))
-#else
-#define mutex_set_holder(m,h) (0)
-#endif
-
-#define mutex_alloc() ((mutex_t) calloc(1, sizeof(struct mutex)))
-#define mutex_init(m) \
- MACRO_BEGIN \
- spin_lock_init(&(m)->lock); \
- cthread_queue_init(&(m)->queue); \
- spin_lock_init(&(m)->held); \
- mutex_set_holder(m, 0); \
- MACRO_END
-#define mutex_set_name(m, x) ((m)->name = (x))
-#define mutex_name(m) ((m)->name != 0 ? (m)->name : "?")
-#define mutex_clear(m) /* nop */???
-#define mutex_free(m) free((m))
-
-extern void mutex_lock_solid(mutex_t _mutex); /* blocking */
-
-extern void mutex_unlock_solid(mutex_t _mutex);
-
-#define mutex_try_lock(m) \
- (spin_try_lock(&(m)->held) ? mutex_set_holder((m), cthread_self()), TRUE : FALSE)
-#define mutex_lock(m) \
- MACRO_BEGIN \
- if (!spin_try_lock(&(m)->held)) { \
- mutex_lock_solid(m); \
- } \
- mutex_set_holder(m, cthread_self()); \
- MACRO_END
-#define mutex_unlock(m) \
- MACRO_BEGIN \
- mutex_set_holder(m, 0); \
- if (spin_unlock(&(m)->held), \
- cthread_queue_head(&(m)->queue, vm_offset_t) != 0) { \
- mutex_unlock_solid(m); \
- } \
- MACRO_END
-
-/*
- * Condition variables.
- */
-typedef struct condition {
- spin_lock_t lock;
- struct cthread_queue queue;
- const char *name;
-} *condition_t;
-
-#define CONDITION_INITIALIZER { SPIN_LOCK_INITIALIZER, QUEUE_INITIALIZER, 0 }
-#define CONDITION_NAMED_INITIALIZER(Name) { SPIN_LOCK_INITIALIZER, QUEUE_INITIALIZER, Name }
-
-#define condition_alloc() \
- ((condition_t) calloc(1, sizeof(struct condition)))
-#define condition_init(c) \
- MACRO_BEGIN \
- spin_lock_init(&(c)->lock); \
- cthread_queue_init(&(c)->queue); \
- MACRO_END
-#define condition_set_name(c, x) ((c)->name = (x))
-#define condition_name(c) ((c)->name != 0 ? (c)->name : "?")
-#define condition_clear(c) \
- MACRO_BEGIN \
- condition_broadcast(c); \
- spin_lock(&(c)->lock); \
- MACRO_END
-#define condition_free(c) \
- MACRO_BEGIN \
- condition_clear(c); \
- free((c)); \
- MACRO_END
-
-#define condition_signal(c) \
- MACRO_BEGIN \
- if ((c)->queue.head) { \
- cond_signal(c); \
- } \
- MACRO_END
-
-#define condition_broadcast(c) \
- MACRO_BEGIN \
- if ((c)->queue.head) { \
- cond_broadcast(c); \
- } \
- MACRO_END
-
-extern void cond_signal(condition_t _cond);
-
-extern void cond_broadcast(condition_t _cond);
-
-extern void condition_wait(condition_t _cond, mutex_t _mutex);
-
-/*
- * Threads.
- */
-
-typedef void * (*cthread_fn_t)(void *arg);
-
-/* XXX We really should be using the setjmp.h that goes with the libc
- * that we're planning on using, since that's where the setjmp()
- * functions are going to be comming from.
- */
-#include <mach/setjmp.h>
-
-typedef struct cthread {
- struct cthread *next;
- struct mutex lock;
- struct condition done;
- int state;
- jmp_buf catch_exit;
- cthread_fn_t func;
- void *arg;
- void *result;
- const char *name;
- void *data;
- void *ldata;
- void *private_data;
- struct ur_cthread *ur;
-} *cthread_t;
-
-#define NO_CTHREAD ((cthread_t) 0)
-
-extern cthread_t cthread_fork(cthread_fn_t _func, void *_arg);
-
-extern void cthread_detach(cthread_t _thread);
-
-extern any_t cthread_join(cthread_t _thread);
-
-extern void cthread_yield(void);
-
-extern void cthread_exit(void *_result);
-
-/*
- * This structure must agree with struct cproc in cthread_internals.h
- */
-typedef struct ur_cthread {
- struct ur_cthread *next;
- cthread_t incarnation;
-} *ur_cthread_t;
-
-#ifndef cthread_sp
-extern vm_offset_t
-cthread_sp(void);
-#endif
-
-extern vm_offset_t cthread_stack_mask;
-
-#if defined(STACK_GROWTH_UP)
-#define ur_cthread_ptr(sp) \
- (* (ur_cthread_t *) ((sp) & cthread_stack_mask))
-#else /* not defined(STACK_GROWTH_UP) */
-#define ur_cthread_ptr(sp) \
- (* (ur_cthread_t *) ( ((sp) | cthread_stack_mask) + 1 \
- - sizeof(ur_cthread_t *)) )
-#endif /* defined(STACK_GROWTH_UP) */
-
-#define ur_cthread_self() (ur_cthread_ptr(cthread_sp()))
-
-#define cthread_assoc(id, t) ((((ur_cthread_t) (id))->incarnation = (t)), \
- ((t) ? ((t)->ur = (ur_cthread_t)(id)) : 0))
-#define cthread_self() (ur_cthread_self()->incarnation)
-
-extern void cthread_set_name(cthread_t _thread, const char *_name);
-
-extern const char * cthread_name(cthread_t _thread);
-
-extern int cthread_count(void);
-
-extern void cthread_set_limit(int _limit);
-
-extern int cthread_limit(void);
-
-extern void cthread_set_kernel_limit(int _n);
-
-extern int cthread_kernel_limit(void);
-
-extern void cthread_wire(void);
-
-extern void cthread_unwire(void);
-
-extern void cthread_msg_busy(mach_port_t _port, int _min, int _max);
-
-extern void cthread_msg_active(mach_port_t _prt, int _min, int _max);
-
-extern mach_msg_return_t cthread_mach_msg(mach_msg_header_t *_header,
- mach_msg_option_t _option,
- mach_msg_size_t _send_size,
- mach_msg_size_t _rcv_size,
- mach_port_t _rcv_name,
- mach_msg_timeout_t _timeout,
- mach_port_t _notify,
- int _min, int _max);
-
-extern void cthread_fork_prepare(void);
-
-extern void cthread_fork_parent(void);
-
-extern void cthread_fork_child(void);
-
-#if defined(THREAD_CALLS)
-/*
- * Routines to replace thread_*.
- */
-extern kern_return_t cthread_get_state(cthread_t _thread);
-
-extern kern_return_t cthread_set_state(cthread_t _thread);
-
-extern kern_return_t cthread_abort(cthread_t _thread);
-
-extern kern_return_t cthread_resume(cthread_t _thread);
-
-extern kern_return_t cthread_suspend(cthread_t _thread);
-
-extern kern_return_t cthread_call_on(cthread_t _thread);
-#endif /* defined(THREAD_CALLS) */
-
-#if defined(CTHREAD_DATA_XX)
-/*
- * Set or get thread specific "global" variable
- *
- * The thread given must be the calling thread (ie. thread_self).
- * XXX This is for compatibility with the old cthread_data. XXX
- */
-extern int cthread_set_data(cthread_t _thread, void *_val);
-
-extern void * cthread_data(cthread_t _thread);
-#else /* defined(CTHREAD_DATA_XX) */
-
-#define cthread_set_data(_thread, _val) ((_thread)->data) = (void *)(_val);
-#define cthread_data(_thread) ((_thread)->data)
-
-#define cthread_set_ldata(_thread, _val) ((_thread)->ldata) = (void *)(_val);
-#define cthread_ldata(_thread) ((_thread)->ldata)
-
-#endif /* defined(CTHREAD_DATA_XX) */
-
-
-/*
- * Support for POSIX thread specific data
- *
- * Multiplexes a thread specific "global" variable
- * into many thread specific "global" variables.
- */
-#define CTHREAD_DATA_VALUE_NULL (void *)0
-#define CTHREAD_KEY_INVALID (cthread_key_t)-1
-
-typedef int cthread_key_t;
-
-/*
- * Create key to private data visible to all threads in task.
- * Different threads may use same key, but the values bound to the key are
- * maintained on a thread specific basis.
- */
-extern int cthread_keycreate(cthread_key_t *_key);
-
-/*
- * Get value currently bound to key for calling thread
- */
-extern int cthread_getspecific(cthread_key_t _key, void **_value);
-
-/*
- * Bind value to given key for calling thread
- */
-extern int cthread_setspecific(cthread_key_t _key, void *_value);
-
-#endif /* not defined(_CTHREADS_) */
diff --git a/include/mach/errorlib.h b/include/mach/errorlib.h
deleted file mode 100644
index 6c4d2bf..0000000
--- a/include/mach/errorlib.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-/*
- * File: errorlib.h
- * Author: Douglas Orr, Carnegie Mellon University
- * Date: Mar. 1988
- *
- * Error bases for subsytems errors.
- */
-
-#include <mach/error.h>
-
-#define KERN_DEVICE_MOD (err_kern|err_sub(1))
-
-#define BOOTSTRAP_FS_MOD (err_bootstrap|err_sub(0))
-
-#define MACH_IPC_SEND_MOD (err_mach_ipc|err_sub(0))
-#define MACH_IPC_RCV_MOD (err_mach_ipc|err_sub(1))
-#define MACH_IPC_MIG_MOD (err_mach_ipc|err_sub(2))
-
-#define IPC_SEND_MOD (err_ipc|err_sub(0))
-#define IPC_RCV_MOD (err_ipc|err_sub(1))
-#define IPC_MIG_MOD (err_ipc|err_sub(2))
-
-#define SERV_NETNAME_MOD (err_server|err_sub(0))
-#define SERV_ENV_MOD (err_server|err_sub(1))
-#define SERV_EXECD_MOD (err_server|err_sub(2))
-
-
-#define NO_SUCH_ERROR "unknown error code"
-
-struct error_subsystem {
- char * subsys_name;
- int max_code;
- char * * codes;
-};
-
-struct error_system {
- int max_sub;
- char * bad_sub;
- struct error_subsystem * subsystem;
-};
-
-extern struct error_system errors[err_max_system+1];
-
-#define errlib_count(s) (sizeof(s)/sizeof(s[0]))
diff --git a/include/mach/flick_mach3.h b/include/mach/flick_mach3.h
deleted file mode 100644
index 7d7675d..0000000
--- a/include/mach/flick_mach3.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-/*
- * Glue for the Flick's Mach 3 backend. (Flick := Flexible IDL Compiler Kit.)
- * This file is included from every header file generated by that backend.
- * It provides standard MOM types and routines.
- */
-#ifndef _MACH_FLICK_MACH3MIG_H_
-#define _MACH_FLICK_MACH3MIG_H_
-
-#include <mach/boolean.h>
-#include <mach/port.h>
-#include <mach/message.h>
-
-typedef char mom_char8_t;
-typedef unsigned8_t mom_unsigned8_t;
-typedef unsigned16_t mom_unsigned16_t;
-typedef unsigned32_t mom_unsigned32_t;
-typedef signed8_t mom_signed8_t;
-typedef signed16_t mom_signed16_t;
-typedef signed32_t mom_signed32_t;
-
-typedef int mom_key_t;
-
-struct mom_ref
-{
- mom_refcount_t count;
- mach_port_t port;
-
- /* Chain on hash mom_ref hash table,
- for canonicalization. */
- struct mom_ref *hash_next;
-
- /* Array of associations for this reference. */
- int assoc_count;
- void *assoc[0];
-};
-typedef struct mom_ref *mom_ref_t;
-
-struct mom_obj
-{
- void *handle;
-
- int port_count;
- mach_port_t port[0];
-};
-typedef struct mom_obj *mom_obj_t;
-
-#define MOM__LABEL_BITS 8
-#define MOM__MAX_LABELS (1 << MOM__LABEL_BITS)
-
-#define mom_get_label_bits() MOM__LABEL_BITS
-
-
-#endif /* _MACH_FLICK_MACH3MIG_H_ */
diff --git a/include/mach/flick_mach3_glue.h b/include/mach/flick_mach3_glue.h
deleted file mode 100644
index 7deb620..0000000
--- a/include/mach/flick_mach3_glue.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-/*
- * Glue for the Flick's Mach 3 backend. (Flick := Flexible IDL Compiler Kit.)
- * This file is included from every stub source code (.c) file generated by that backend.
- * Stubs are built primarily out of invocations of these macros.
- */
-#ifndef _MACH_FLICK_MACH3_GLUE_H_
-#define _MACH_FLICK_MACH3_GLUE_H_
-
-#include <stdlib.h>
-#include <string.h>
-#include <mach/flick_mach3.h>
-
-
-/*** Internal Flick data types ***/
-
-/* Each client stub allocates one of these on its stack first thing,
- and holds all the important generic state throughout RPC processing. */
-struct flick_mach3_rpc_desc
-{
- /* This is initially set to point to init_buf,
- but is dynamically re-allocated if more space is needed. */
- char *msg_buf;
- vm_size_t msg_buf_size;
-
- /* Before calling flick_mach3_rpc(),
- the client stub sets this to the offset of the end of the data it marshaled.
- It always starts marshaling at offset 4*4, to leave room for a mach_msg_header
- (which is actually 6*4 bytes, but overwrites the 2*4-byte marshaled IDL ID). */
- vm_size_t send_end_ofs;
-
- /* flick_mach3_rpc() sets these to the offset of the data to unmarshal,
- and the offset of the end of the data to unmarshal, respectively. */
- vm_size_t rcv_ofs, rcv_end_ofs;
-
- /* The size of this buffer varies from stub to stub. */
- char init_buf[0];
-};
-
-/* Each server stub allocates one of these on its stack first thing,
- and holds all the important generic state throughout RPC processing. */
-struct flick_mach3_rpc_serv_desc
-{
- /* This is initially set to point to init_buf,
- but is dynamically re-allocated if more space is needed. */
- char *msg_buf;
- vm_size_t msg_buf_size;
-
- /* Before calling flick_mach3_rpc(),
- the client stub sets this to the offset of the end of the data it marshaled.
- It always starts marshaling at offset 4*4, to leave room for a mach_msg_header
- (which is actually 6*4 bytes, but overwrites the 2*4-byte marshaled IDL ID). */
- vm_size_t send_end_ofs;
-
- /* flick_mach3_rpc() sets these to the offset of the data to unmarshal,
- and the offset of the end of the data to unmarshal, respectively. */
- vm_size_t rcv_ofs, rcv_end_ofs;
-
- /* The size of this buffer varies from stub to stub. */
- char init_buf[0];
-};
-
-
-/*** Encoding ***/
-
-#define flick_mach3_encode_new_glob(max_size) \
-{ \
- while (_desc.d.send_end_ofs + (max_size) > _desc.d.msg_buf_size) \
- { \
- mach_msg_return_t result = flick_mach3_rpc_grow_buf(&_desc); \
- /*XXX result */ \
- } \
- _e_chunk = _desc.d.msg_buf + _desc.d.send_end_ofs; \
-}
-#define flick_mach3_encode_end_glob(max_size) \
- _desc.d.send_end_ofs += (max_size);
-
-#define flick_mach3_encode_new_chunk(size) /* do nothing */
-#define flick_mach3_encode_end_chunk(size) (_e_chunk += (size))
-
-#define flick_mach3_encode_prim(_ofs, _data, _name, _bits, _ctype) \
-{ \
- struct { mach_msg_type_t _t; _ctype _v; } *_p = (void*)(_e_chunk + _ofs); \
- mach_msg_type_t _tmpl = { _name, _bits, 1, 1, 0, 0 }; \
- _p->_t = _tmpl; _p->_v = (_data); \
-}
-
-#define flick_mach3_encode_boolean(_ofs, _data) \
- flick_mach3_encode_prim(_ofs, _data, MACH_MSG_TYPE_BOOLEAN, 32, signed32_t);
-
-#define flick_mach3_encode_char8(_ofs, _data) \
- flick_mach3_encode_prim(_ofs, _data, MACH_MSG_TYPE_CHAR, 8, signed8_t);
-#define flick_mach3_encode_char16(_ofs, _data) \
- flick_mach3_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 8, signed16_t);
-
-#define flick_mach3_encode_signed8(_ofs, _data) \
- flick_mach3_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, signed8_t);
-#define flick_mach3_encode_unsigned8(ofs, data) \
- flick_mach3_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, unsigned8_t);
-#define flick_mach3_encode_signed16(_ofs, _data) \
- flick_mach3_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, signed16_t);
-#define flick_mach3_encode_unsigned16(ofs, data) \
- flick_mach3_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, unsigned16_t);
-#define flick_mach3_encode_signed32(_ofs, _data) \
- flick_mach3_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, signed32_t);
-#define flick_mach3_encode_unsigned32(ofs, data) \
- flick_mach3_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, unsigned32_t);
-
-#define flick_mach3_encode_port(_ofs, _data, _adjust) \
-{ \
- if (_adjust > 1) { \
- kern_return_t res = mach_port_mod_refs(mach_task_self(), (_data), \
- MACH_PORT_RIGHT_SEND, -(_adjust-1)); \
- } \
- flick_mach3_encode_prim(_ofs, _data, \
- _adjust ? MACH_MSG_TYPE_MOVE_SEND : MACH_MSG_TYPE_COPY_SEND, \
- 32, mach_port_t); \
-}
-
-
-/*** Decoding ***/
-
-#if TypeCheck
-#define flick_iftypecheck(code) code
-#else
-#define flick_iftypecheck(code)
-#endif
-
-#define flick_mach3_decode_new_glob(max_size)
-#define flick_mach3_decode_end_glob(max_size)
-
-#define flick_mach3_decode_new_chunk(size) \
-{ \
- flick_iftypecheck( \
- if (_desc.d.rcv_ofs + (size) > _d_msgsize) \
- XXX throw MIG_TYPE_ERROR; \
- ); \
- _d_chunk = _desc.d.msg_buf + _desc.d.rcv_ofs; \
-}
-#define flick_mach3_decode_end_chunk(size) \
- _desc.d.rcv_ofs += (size);
-
-#define flick_mach3_decode_prim(_ofs, _data, _name, _bits, _ctype) \
-{ \
- struct { mach_msg_type_t _t; _ctype _v; } *_p = (void*)(_d_chunk + _ofs); \
- flick_iftypecheck( ({ \
- mach_msg_type_t _tmpl = { _name, _bits, 1, 1, 0, 0 }; \
- if (*((signed32_t*)&_tmpl) != *((signed32_t)&_p->_t)) \
- XXX throw MIG_TYPE_ERROR; \
- )} ) \
- (_data) = _p->_v; \
-}
-
-#define flick_mach3_decode_boolean(_ofs, _data) \
- flick_mach3_decode_prim(_ofs, _data, MACH_MSG_TYPE_BOOLEAN, 32, signed32_t);
-
-#define flick_mach3_decode_char8(_ofs, _data) \
- flick_mach3_decode_prim(_ofs, _data, MACH_MSG_TYPE_CHAR, 8, signed8_t);
-#define flick_mach3_decode_char16(_ofs, _data) \
- flick_mach3_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 8, signed16_t);
-
-#define flick_mach3_decode_signed8(_ofs, _data) \
- flick_mach3_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, signed8_t);
-#define flick_mach3_decode_unsigned8(_ofs, _data) \
- flick_mach3_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, unsigned8_t);
-#define flick_mach3_decode_signed16(_ofs, _data) \
- flick_mach3_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, signed16_t);
-#define flick_mach3_decode_unsigned16(_ofs, _data) \
- flick_mach3_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, unsigned16_t);
-#define flick_mach3_decode_signed32(_ofs, _data) \
- flick_mach3_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, signed32_t);
-#define flick_mach3_decode_unsigned32(_ofs, _data) \
- flick_mach3_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, unsigned32_t);
-
-#define flick_mach3_decode_port(_ofs, _data, _adjust) \
-{ \
- flick_mach3_decode_prim(_ofs, _data, MACH_MSG_TYPE_PORT_SEND, 32, mach_port_t); \
- if (_adjust != 1) { \
- kern_return_t res = mach_port_mod_refs(mach_task_self(), (_data), \
- MACH_PORT_RIGHT_SEND, _adjust-1); \
- } \
-}
-
-
-/*** Client-side support ***/
-
-mach_msg_return_t flick_mach3_rpc(struct flick_mach3_rpc_desc *rpc,
- mach_port_t send_target, mach_msg_bits_t send_msgh_bits);
-
-#define flick_mach3_rpc_macro(iscomplex) \
-{ \
- kern_return_t result = flick_mach3_rpc(&_desc.d, _msg_request/*XXX*/, \
- (iscomplex ? MACH_MSGH_BITS_COMPLEX : 0) \
- | MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE));\
-}
-
-#endif /* _MACH_FLICK_MACH3_GLUE_H_ */
diff --git a/include/mach/flick_mach3mig_glue.h b/include/mach/flick_mach3mig_glue.h
deleted file mode 100644
index c1ed04a..0000000
--- a/include/mach/flick_mach3mig_glue.h
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-/*
- * Glue for the Flick's Mach 3 backend. (Flick := Flexible IDL Compiler Kit.)
- * This file is included from every stub source code (.c) file generated by that backend.
- * Stubs are built primarily out of invocations of these macros.
- */
-#ifndef _MACH_FLICK_MACH3MIG_GLUE_H_
-#define _MACH_FLICK_MACH3MIG_GLUE_H_
-
-#include <stdlib.h>
-#include <string.h>
-#include <mach/mig_errors.h>
-#include <mach/flick_mach3mig.h>
-
-
-#define FLICK_NO_MEMORY 499 /*XXX*/
-
-
-/*** Internal Flick data types ***/
-
-/* Each client stub allocates one of these on its stack first thing,
- and holds all the important generic state throughout RPC processing. */
-struct flick_mach3mig_rpc_desc
-{
- /* This is initially set to point to init_buf,
- but is dynamically re-allocated if more space is needed. */
- mig_reply_header_t *msg_buf;
- vm_size_t msg_buf_size;
-
- /* Before calling flick_mach3mig_rpc(),
- the client stub sets this to the offset of the end of the data it marshaled.
- It always starts marshaling just after the Mach message header. */
- vm_size_t send_end_ofs;
-
- /* flick_mach3mig_rpc() sets these to the offset of the data to unmarshal,
- and the offset of the end of the data to unmarshal, respectively. */
- vm_size_t rcv_ofs, rcv_end_ofs;
-
- /* The actual size of this buffer varies from stub to stub. */
- mig_reply_header_t init_buf;
-};
-
-/* Each server stub allocates one of these on its stack first thing,
- and holds all the important generic state throughout RPC processing. */
-struct flick_mach3mig_rpc_serv_desc
-{
- /* During decoding msg_buf is InHeadP;
- during encoding msg_buf is OutHeadP.
- msg_buf_size is always simply a "very large" constant -
- i.e. we don't know how big the buffer is; we just assume it's big enough. */
- mig_reply_header_t *msg_buf;
- vm_size_t msg_buf_size;
-
- /* flick_mach3mig_serv_start_encode() sets these
- to the offset of the data to unmarshal,
- and the offset of the end of the data to unmarshal, respectively. */
- vm_size_t rcv_ofs, rcv_end_ofs;
-
- /* After the reply message has been encoded,
- this contains the offset of the end of the data it marshaled. */
- vm_size_t send_end_ofs;
-};
-
-
-
-/*** Memory allocation/deallocation ***/
-
-#define flick_alloc_mach_vm(size) \
-({ \
- vm_address_t addr; \
- if (_err = vm_allocate(mach_task_self(), &addr, (size), 1)) return _err; \
- (void*)addr; \
-})
-#define flick_free_mach_vm(addr, size) \
- if (_err = vm_deallocate(mach_task_self(), (addr), (size))) return _err;
-
-
-/*** Encoding ***/
-
-#define flick_mach3mig_encode_target(_data, _adjust) \
-{ \
- if (_adjust > 1) { \
- if (_err = mach_port_mod_refs(mach_task_self(), (_data), \
- MACH_PORT_RIGHT_SEND, -(_adjust-1))) return _err; \
- } \
- _desc.d.msg_buf->Head.msgh_remote_port = (_data); \
- _desc.d.msg_buf->Head.msgh_bits = MACH_MSGH_BITS( \
- _adjust ? MACH_MSG_TYPE_MOVE_SEND : MACH_MSG_TYPE_COPY_SEND, 0); \
-}
-
-/* Primitive types with individual type descriptors. */
-#define flick_mach3mig_encode_new_glob(max_size) \
-{ \
- while (_desc.d.send_end_ofs + (max_size) > _desc.d.msg_buf_size) \
- if (_err = flick_mach3mig_rpc_grow_buf(&_desc)) return _err; \
- _e_chunk = (void*)_desc.d.msg_buf + _desc.d.send_end_ofs; \
-}
-#define flick_mach3mig_encode_end_glob(max_size) \
- _desc.d.send_end_ofs += (max_size);
-
-#define flick_mach3mig_encode_new_chunk(size) /* do nothing */
-#define flick_mach3mig_encode_end_chunk(size) (_e_chunk += (size))
-
-#define flick_mach3mig_encode_prim(_ofs, _data, _name, _bits, _ctype) \
-{ \
- struct { mach_msg_type_t _t; _ctype _v; } *_p = (void*)(_e_chunk + _ofs); \
- mach_msg_type_t _tmpl = { _name, _bits, 1, 1, 0, 0 }; \
- _p->_t = _tmpl; _p->_v = (_data); \
-}
-#define flick_mach3mig_encode_boolean(_ofs, _data) \
- flick_mach3mig_encode_prim(_ofs, _data, MACH_MSG_TYPE_BOOLEAN, 32, signed32_t);
-#define flick_mach3mig_encode_char8(_ofs, _data) \
- flick_mach3mig_encode_prim(_ofs, _data, MACH_MSG_TYPE_CHAR, 8, signed8_t);
-#define flick_mach3mig_encode_char16(_ofs, _data) \
- flick_mach3mig_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 8, signed16_t);
-#define flick_mach3mig_encode_signed8(_ofs, _data) \
- flick_mach3mig_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, signed8_t);
-#define flick_mach3mig_encode_unsigned8(_ofs, _data) \
- flick_mach3mig_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, unsigned8_t);
-#define flick_mach3mig_encode_signed16(_ofs, _data) \
- flick_mach3mig_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, signed16_t);
-#define flick_mach3mig_encode_unsigned16(_ofs, _data) \
- flick_mach3mig_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, unsigned16_t);
-#define flick_mach3mig_encode_signed32(_ofs, _data) \
- flick_mach3mig_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, signed32_t);
-#define flick_mach3mig_encode_unsigned32(_ofs, _data) \
- flick_mach3mig_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, unsigned32_t);
-#define flick_mach3mig_encode_port(_ofs, _data, _adjust) \
-{ \
- if (_adjust > 1) { \
- if (_err = mach_port_mod_refs(mach_task_self(), (_data), \
- MACH_PORT_RIGHT_SEND, -(_adjust-1))) return _err; \
- } \
- flick_mach3mig_encode_prim(_ofs, _data, \
- _adjust ? MACH_MSG_TYPE_MOVE_SEND : MACH_MSG_TYPE_COPY_SEND, \
- 32, mach_port_t); \
-}
-
-/* Array type descriptors. */
-#define flick_mach3mig_array_encode_type(_ofs, _name, _bits, _ctype, _num, _inl) \
-{ \
- mach_msg_type_t *_p = (void*)(_e_chunk + _ofs); \
- mach_msg_type_t _tmpl = { _name, _bits, _num, _inl, 0, 0 }; \
- *_p = _tmpl; \
-}
-#define flick_mach3mig_array_encode_long_type(_ofs, _name, _bits, _ctype, _num, _inl) \
-{ \
- mach_msg_type_long_t *_p = (void*)(_e_chunk + _ofs); \
- mach_msg_type_long_t _tmpl = { { 0, 0, 0, _inl, 1, 0 }, _name, _bits, _num}; \
- *_p = _tmpl; \
-}
-#define flick_mach3mig_array_encode_boolean_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_encode##_long(_ofs, MACH_MSG_TYPE_BOOLEAN, 32, signed32_t, _num, _inl);
-#define flick_mach3mig_array_encode_char8_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_encode##_long(_ofs, MACH_MSG_TYPE_CHAR, 8, signed8_t, _num, _inl);
-#define flick_mach3mig_array_encode_char16_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_encode##_long(_ofs, MACH_MSG_TYPE_INTEGER_16, 8, signed16_t, _num, _inl);
-#define flick_mach3mig_array_encode_signed8_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_encode##_long(_ofs, MACH_MSG_TYPE_INTEGER_8, 8, signed8_t, _num, _inl);
-#define flick_mach3mig_array_encode_unsigned8_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_encode##_long(_ofs, MACH_MSG_TYPE_INTEGER_8, 8, unsigned8_t, _num, _inl);
-#define flick_mach3mig_array_encode_signed16_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_encode##_long(_ofs, MACH_MSG_TYPE_INTEGER_16, 16, signed16_t, _num, _inl);
-#define flick_mach3mig_array_encode_unsigned16_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_encode##_long(_ofs, MACH_MSG_TYPE_INTEGER_16, 16, unsigned16_t, _num, _inl);
-#define flick_mach3mig_array_encode_signed32_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_encode##_long(_ofs, MACH_MSG_TYPE_INTEGER_32, 32, signed32_t, _num, _inl);
-#define flick_mach3mig_array_encode_unsigned32_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_encode##_long(_ofs, MACH_MSG_TYPE_INTEGER_32, 32, unsigned32_t, _num, _inl);
-
-/* Array elements. */
-#define flick_mach3mig_array_encode_new_glob(max_size) flick_mach3mig_encode_new_glob(max_size)
-#define flick_mach3mig_array_encode_end_glob(max_size) flick_mach3mig_encode_end_glob(max_size)
-#define flick_mach3mig_array_encode_new_chunk(size) flick_mach3mig_encode_new_chunk(size)
-#define flick_mach3mig_array_encode_end_chunk(size) flick_mach3mig_encode_end_chunk(size)
-
-#define flick_mach3mig_array_encode_prim(_ofs, _data, _name, _bits, _ctype) \
-{ \
- _ctype *_p = (void*)(_e_chunk + _ofs); \
- *_p = (_data); \
-}
-#define flick_mach3mig_array_encode_boolean(_ofs, _data) \
- flick_mach3mig_array_encode_prim(_ofs, _data, MACH_MSG_TYPE_BOOLEAN, 32, signed32_t);
-#define flick_mach3mig_array_encode_char8(_ofs, _data) \
- flick_mach3mig_array_encode_prim(_ofs, _data, MACH_MSG_TYPE_CHAR, 8, signed8_t);
-#define flick_mach3mig_array_encode_char16(_ofs, _data) \
- flick_mach3mig_array_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 8, signed16_t);
-#define flick_mach3mig_array_encode_signed8(_ofs, _data) \
- flick_mach3mig_array_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, signed8_t);
-#define flick_mach3mig_array_encode_unsigned8(_ofs, _data) \
- flick_mach3mig_array_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, unsigned8_t);
-#define flick_mach3mig_array_encode_signed16(_ofs, _data) \
- flick_mach3mig_array_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, signed16_t);
-#define flick_mach3mig_array_encode_unsigned16(_ofs, _data) \
- flick_mach3mig_array_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, unsigned16_t);
-#define flick_mach3mig_array_encode_signed32(_ofs, _data) \
- flick_mach3mig_array_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, signed32_t);
-#define flick_mach3mig_array_encode_unsigned32(_ofs, _data) \
- flick_mach3mig_array_encode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, unsigned32_t);
-#define flick_mach3mig_array_encode_port(_ofs, _data, _adjust) \
-{ \
- if (_adjust > 1) { \
- if (_err = mach_port_mod_refs(mach_task_self(), (_data), \
- MACH_PORT_RIGHT_SEND, -(_adjust-1))) return _err; \
- } \
- flick_mach3mig_array_encode_prim(_ofs, _data, \
- _adjust ? MACH_MSG_TYPE_MOVE_SEND : MACH_MSG_TYPE_COPY_SEND, \
- 32, mach_port_t); \
-}
-
-/* Out-of-line buffer support. */
-#define flick_mach3mig_array_encode_ool_start(_ofs, _size) \
-{ \
- vm_address_t *_p = (void*)(_e_chunk + _ofs); \
- struct { struct { void *msg_buf; vm_size_t msg_buf_size, send_end_ofs; } d; } _desc; \
- void *_e_chunk; \
- \
- _desc.d.msg_buf_size = (_size); \
- if (_err = vm_allocate(mach_task_self(), _p, _desc.d.msg_buf_size, 1)) \
- return _err; \
- _desc.d.msg_buf = (void*)*_p; _desc.d.send_end_ofs = 0;
-
-#define flick_mach3mig_array_encode_ool_end() \
-}
-
-
-
-/*** Decoding ***/
-
-#if TypeCheck
-#define flick_iftypecheck(code) code
-#else
-#define flick_iftypecheck(code)
-#endif
-
-/* Primitive types with individual type descriptors. */
-#define flick_mach3mig_decode_new_glob(max_size)
-#define flick_mach3mig_decode_end_glob(max_size)
-
-#define flick_mach3mig_decode_new_chunk(size) \
-{ \
- flick_iftypecheck( \
- if (_desc.d.rcv_ofs + (size) > _desc.d.rcv_end_ofs) \
- return MIG_TYPE_ERROR; \
- ); \
- _d_chunk = (void*)_desc.d.msg_buf + _desc.d.rcv_ofs; \
-}
-#define flick_mach3mig_decode_end_chunk(size) \
- _desc.d.rcv_ofs += (size);
-
-#define flick_mach3mig_decode_prim(_ofs, _data, _name, _bits, _ctype) \
-{ \
- struct { mach_msg_type_t _t; _ctype _v; } *_p = (void*)(_d_chunk + _ofs); \
- flick_iftypecheck( ({ \
- mach_msg_type_t _tmpl = { _name, _bits, 1, 1, 0, 0 }; \
- if (*((signed32_t*)&_tmpl) != *((signed32_t*)&_p->_t)) \
- return MIG_TYPE_ERROR; \
- )} ) \
- (_data) = _p->_v; \
-}
-#define flick_mach3mig_decode_boolean(_ofs, _data) \
- flick_mach3mig_decode_prim(_ofs, _data, MACH_MSG_TYPE_BOOLEAN, 32, signed32_t);
-#define flick_mach3mig_decode_char8(_ofs, _data) \
- flick_mach3mig_decode_prim(_ofs, _data, MACH_MSG_TYPE_CHAR, 8, signed8_t);
-#define flick_mach3mig_decode_char16(_ofs, _data) \
- flick_mach3mig_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 8, signed16_t);
-#define flick_mach3mig_decode_signed8(_ofs, _data) \
- flick_mach3mig_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, signed8_t);
-#define flick_mach3mig_decode_unsigned8(_ofs, _data) \
- flick_mach3mig_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, unsigned8_t);
-#define flick_mach3mig_decode_signed16(_ofs, _data) \
- flick_mach3mig_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, signed16_t);
-#define flick_mach3mig_decode_unsigned16(_ofs, _data) \
- flick_mach3mig_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, unsigned16_t);
-#define flick_mach3mig_decode_signed32(_ofs, _data) \
- flick_mach3mig_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, signed32_t);
-#define flick_mach3mig_decode_unsigned32(_ofs, _data) \
- flick_mach3mig_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, unsigned32_t);
-#define flick_mach3mig_decode_port(_ofs, _data, _adjust) \
-{ \
- flick_mach3mig_decode_prim(_ofs, _data, MACH_MSG_TYPE_PORT_SEND, 32, mach_port_t); \
- if (_adjust != 1) { \
- if (_err = mach_port_mod_refs(mach_task_self(), (_data), \
- MACH_PORT_RIGHT_SEND, _adjust-1)) return _err; \
- } \
-}
-
-/* Array type descriptors. */
-#define flick_mach3mig_array_decode_type(_ofs, _name, _bits, _ctype, _num, _inl) \
-{ \
- mach_msg_type_t *_p = (void*)(_e_chunk + _ofs); \
- flick_iftypecheck( ({ \
- mach_msg_type_t _tmpl = { _name, _bits, _num, _inl, 0, 0 }; \
- if (*((signed32_t*)&_tmpl) != *((signed32_t*)_p)) \
- return MIG_TYPE_ERROR; \
- )} ) \
-}
-#define flick_mach3mig_array_decode_long_type(_ofs, _name, _bits, _ctype, _num, _inl) \
-{ \
- mach_msg_type_long_t *_p = (void*)(_e_chunk + _ofs); \
- flick_iftypecheck( ({ \
- mach_msg_type_long_t _tmpl = { { 0, 0, 0, _inl, 1, 0 }, _name, _bits, _num}; \
- if (memcmp(&_tmpl, _p, sizeof(_tmpl))) \
- return MIG_TYPE_ERROR; \
- )} ) \
-}
-#define flick_mach3mig_array_decode_boolean_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_decode##_long(_ofs, MACH_MSG_TYPE_BOOLEAN, 32, signed32_t, _num, _inl);
-#define flick_mach3mig_array_decode_char8_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_decode##_long(_ofs, MACH_MSG_TYPE_CHAR, 8, signed8_t, _num, _inl);
-#define flick_mach3mig_array_decode_char16_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_decode##_long(_ofs, MACH_MSG_TYPE_INTEGER_16, 8, signed16_t, _num, _inl);
-#define flick_mach3mig_array_decode_signed8_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_decode##_long(_ofs, MACH_MSG_TYPE_INTEGER_8, 8, signed8_t, _num, _inl);
-#define flick_mach3mig_array_decode_unsigned8_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_decode##_long(_ofs, MACH_MSG_TYPE_INTEGER_8, 8, unsigned8_t, _num, _inl);
-#define flick_mach3mig_array_decode_signed16_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_decode##_long(_ofs, MACH_MSG_TYPE_INTEGER_16, 16, signed16_t, _num, _inl);
-#define flick_mach3mig_array_decode_unsigned16_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_decode##_long(_ofs, MACH_MSG_TYPE_INTEGER_16, 16, unsigned16_t, _num, _inl);
-#define flick_mach3mig_array_decode_signed32_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_decode##_long(_ofs, MACH_MSG_TYPE_INTEGER_32, 32, signed32_t, _num, _inl);
-#define flick_mach3mig_array_decode_unsigned32_type(_ofs, _num, _inl, _long) \
- flick_mach3mig_array_decode##_long(_ofs, MACH_MSG_TYPE_INTEGER_32, 32, unsigned32_t, _num, _inl);
-
-/* Array elements. */
-#define flick_mach3mig_array_decode_new_glob(max_size) flick_mach3mig_decode_new_glob(max_size)
-#define flick_mach3mig_array_decode_end_glob(max_size) flick_mach3mig_decode_end_glob(max_size)
-#define flick_mach3mig_array_decode_new_chunk(size) flick_mach3mig_decode_new_chunk(size)
-#define flick_mach3mig_array_decode_end_chunk(size) flick_mach3mig_decode_end_chunk(size)
-
-#define flick_mach3mig_array_decode_prim(_ofs, _data, _name, _bits, _ctype) \
-{ \
- _ctype *_p = (void*)(_d_chunk + _ofs); \
- (_data) = *_p; \
-}
-#define flick_mach3mig_array_decode_boolean(_ofs, _data) \
- flick_mach3mig_array_decode_prim(_ofs, _data, MACH_MSG_TYPE_BOOLEAN, 32, signed32_t);
-#define flick_mach3mig_array_decode_char8(_ofs, _data) \
- flick_mach3mig_array_decode_prim(_ofs, _data, MACH_MSG_TYPE_CHAR, 8, signed8_t);
-#define flick_mach3mig_array_decode_char16(_ofs, _data) \
- flick_mach3mig_array_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 8, signed16_t);
-#define flick_mach3mig_array_decode_signed8(_ofs, _data) \
- flick_mach3mig_array_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, signed8_t);
-#define flick_mach3mig_array_decode_unsigned8(_ofs, _data) \
- flick_mach3mig_array_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_8, 8, unsigned8_t);
-#define flick_mach3mig_array_decode_signed16(_ofs, _data) \
- flick_mach3mig_array_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, signed16_t);
-#define flick_mach3mig_array_decode_unsigned16(_ofs, _data) \
- flick_mach3mig_array_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_16, 16, unsigned16_t);
-#define flick_mach3mig_array_decode_signed32(_ofs, _data) \
- flick_mach3mig_array_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, signed32_t);
-#define flick_mach3mig_array_decode_unsigned32(_ofs, _data) \
- flick_mach3mig_array_decode_prim(_ofs, _data, MACH_MSG_TYPE_INTEGER_32, 32, unsigned32_t);
-#define flick_mach3mig_array_decode_port(_ofs, _data, _adjust) \
-{ \
- flick_mach3mig_array_decode_prim(_ofs, _data, MACH_MSG_TYPE_PORT_SEND, 32, mach_port_t); \
- if (_adjust != 1) { \
- kern_return_t res = mach_port_mod_refs(mach_task_self(), (_data), \
- MACH_PORT_RIGHT_SEND, _adjust-1); \
- } \
-}
-
-/* Out-of-line buffer support. */
-#define flick_mach3mig_array_decode_ool_start(_ofs, _size) \
-{ \
- vm_address_t *_p = (void*)(_e_chunk + _ofs); \
- struct { struct { void *msg_buf; vm_size_t rcv_ofs, rcv_end_ofs; } d; } _desc; \
- void *_e_chunk; \
- \
- _desc.d.msg_buf = (void*)*_p; _desc.d.rcv_ofs = 0; _desc.d.rcv_end_ofs = (_size);\
-
-#define flick_mach3mig_array_decode_ool_end() \
- if (_err = vm_deallocate(mach_task_self(), *_p, _desc.d.rcv_end_ofs)) \
- return _err; \
-}
-
-
-/*** Client-side support ***/
-
-mach_msg_return_t flick_mach3mig_rpc(struct flick_mach3mig_rpc_desc *rpc);
-
-#define flick_mach3mig_rpc_macro(iscomplex) \
-{ \
- _desc.d.msg_buf->Head.msgh_bits |= \
- MACH_MSGH_BITS(0, MACH_MSG_TYPE_MAKE_SEND_ONCE) \
- | (iscomplex ? MACH_MSGH_BITS_COMPLEX : 0); \
- if (_err = flick_mach3mig_rpc(&_desc.d)) return _err; \
-}
-
-#define flick_mach3mig_send_macro(iscomplex) \
-{ \
- _desc.d.msg_buf->Head.msgh_bits |= (iscomplex ? MACH_MSGH_BITS_COMPLEX : 0); \
- if (_err = flick_mach3mig_rpc(&_desc.d)) return _err; \
-}
-
-
-/*** Server-side support ***/
-
-#define flick_mach3mig_serv_start_decode() \
-{ \
- _desc.d.msg_buf = (mig_reply_header_t*)InHeadP; \
- _desc.d.msg_buf_size = 0x7fffffff; \
- _desc.d.rcv_ofs = sizeof(mach_msg_header_t); \
- _desc.d.rcv_end_ofs = InHeadP->msgh_size; \
-}
-
-#define flick_mach3mig_serv_end_decode() /* do nothing */
-
-#define flick_mach3mig_serv_start_encode() \
-{ \
- _desc.d.msg_buf = (mig_reply_header_t*)OutHeadP; \
- _desc.d.send_end_ofs = sizeof(mig_reply_header_t); \
-}
-
-#define flick_mach3mig_serv_end_encode() \
-{ \
- mach_msg_type_t _ret_tmpl = { MACH_MSG_TYPE_INTEGER_32, 32, 1, 1, 0, 0 }; \
- OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); \
- OutHeadP->msgh_size = _desc.d.send_end_ofs; \
- OutHeadP->msgh_remote_port = InHeadP->msgh_remote_port; \
- OutHeadP->msgh_local_port = MACH_PORT_NULL; \
- _desc.d.msg_buf->RetCodeType = _ret_tmpl; \
- _desc.d.msg_buf->RetCode = _return; \
-}
-
-
-#endif /* _MACH_FLICK_MACH3MIG_GLUE_H_ */
diff --git a/include/mach/lmm.h b/include/mach/lmm.h
deleted file mode 100644
index f350329..0000000
--- a/include/mach/lmm.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-/*
- * Public header file for the List Memory Manager.
- */
-#ifndef _MACH_LMM_H_
-#define _MACH_LMM_H_
-
-#include <mach/machine/vm_types.h>
-
-/* The contents of this structure is opaque to users. */
-typedef struct lmm
-{
- struct lmm_region *regions;
-} lmm_t;
-
-#define LMM_INITIALIZER { 0 }
-
-typedef natural_t lmm_flags_t;
-typedef integer_t lmm_pri_t;
-
-void lmm_init(lmm_t *lmm);
-void lmm_add(lmm_t *lmm, vm_offset_t addr, vm_size_t size,
- lmm_flags_t flags, lmm_pri_t pri);
-void *lmm_alloc(lmm_t *lmm, vm_size_t size, lmm_flags_t flags);
-void *lmm_alloc_aligned(lmm_t *lmm, vm_size_t size, lmm_flags_t flags,
- int align_bits, vm_offset_t align_ofs);
-void *lmm_alloc_page(lmm_t *lmm, lmm_flags_t flags);
-void *lmm_alloc_gen(lmm_t *lmm, vm_size_t size, lmm_flags_t flags,
- int align_bits, vm_offset_t align_ofs,
- vm_offset_t bounds_min, vm_offset_t bounds_max);
-vm_size_t lmm_avail(lmm_t *lmm, lmm_flags_t flags);
-void lmm_find_free(lmm_t *lmm, vm_offset_t *inout_addr,
- vm_size_t *out_size, lmm_flags_t *out_flags);
-void lmm_free(lmm_t *lmm, void *block, vm_size_t size);
-
-/* Only available if debugging turned on. */
-void lmm_dump(lmm_t *lmm);
-
-#endif /* _MACH_LMM_H_ */
diff --git a/include/mach/sa/a.out.h b/include/mach/sa/a.out.h
deleted file mode 100644
index 8ab8ba8..0000000
--- a/include/mach/sa/a.out.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_SA_A_OUT_H_
-#define _MACH_SA_A_OUT_H_
-
-#include <mach/exec/a.out.h>
-
-#endif _MACH_SA_A_OUT_H_
diff --git a/include/mach/sa/alloca.h b/include/mach/sa/alloca.h
deleted file mode 100644
index 0a476b4..0000000
--- a/include/mach/sa/alloca.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory (CSL). All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_ALLOCA_H_
-#define _MACH_ALLOCA_H_
-
-#define alloca(size) __builtin_alloca(size)
-
-#endif _MACH_ALLOCA_H_
diff --git a/include/mach/sa/assert.h b/include/mach/sa/assert.h
deleted file mode 100644
index 8c12f1c..0000000
--- a/include/mach/sa/assert.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _ASSERT_H_
-#define _ASSERT_H_
-
-#ifdef NDEBUG
-
-#define assert(ignore) ((void)0)
-
-#else
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-extern void panic(const char *format, ...);
-__END_DECLS
-
-#define assert(expression) \
- ((void)((expression) ? 0 : (panic("%s:%u: failed assertion `%s'", \
- __FILE__, __LINE__, #expression), 0)))
-
-#endif
-
-#endif /* _ASSERT_H_ */
diff --git a/include/mach/sa/ctype.h b/include/mach/sa/ctype.h
deleted file mode 100644
index 40b5366..0000000
--- a/include/mach/sa/ctype.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory (CSL). All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_CTYPE_H_
-#define _MACH_CTYPE_H_
-
-#include <sys/cdefs.h>
-
-__INLINE_FUNC int isdigit(char c)
-{
- return ((c) >= '0') && ((c) <= '9');
-}
-
-__INLINE_FUNC int isspace(char c)
-{
- return ((c) == ' ') || ((c) == '\f')
- || ((c) == '\n') || ((c) == '\r')
- || ((c) == '\t') || ((c) == '\v');
-}
-
-__INLINE_FUNC int isalpha(char c)
-{
- return (((c) >= 'a') && ((c) <= 'z'))
- || (((c) >= 'A') && ((c) <= 'Z'));
-}
-
-__INLINE_FUNC int isalnum(char c)
-{
- return isalpha(c) || isdigit(c);
-}
-
-__INLINE_FUNC int toupper(char c)
-{
- return ((c >= 'a') && (c <= 'z')) ? (c - 'a' + 'A') : c;
-}
-
-__INLINE_FUNC int tolower(char c)
-{
- return ((c >= 'A') && (c <= 'Z')) ? (c - 'A' + 'a') : c;
-}
-
-
-#endif _MACH_CTYPE_H_
diff --git a/include/mach/sa/errno.h b/include/mach/sa/errno.h
deleted file mode 100644
index 1e8be23..0000000
--- a/include/mach/sa/errno.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-/*
- * This header file defines a set of POSIX errno values
- * that fits consistently into the Mach error code "space" -
- * i.e. these error code values can be mixed with kern_return_t's
- * and mach_msg_return_t's and such without conflict.
- * Higher-level services are not required to use these values
- * (or, for that matter, any of the mach/sa header files),
- * but if they use other values of their own choosing,
- * those values may conflict with values in the Mach error code space,
- * making it necessary to keep the different types of error codes separate.
- *
- * (For example, Lites uses BSD's errno values,
- * which conflict with Mach's kern_return_t values,
- * and therefore must carefully distinguish between BSD and Mach error codes
- * and never return one type when the other is expected, etc. -
- * we've found this to be a frequent source of bugs.)
- *
- * One (probably the main) disadvantage of using these error codes
- * is that, since they don't start from around 0 like typical Unix errno values,
- * it's impossible to provide a conventional Unix-style sys_errlist table for them.
- * However, they are compatible with the POSIX-blessed strerror and perror routines.
- */
-#ifndef _MACH_SA_ERRNO_H_
-#define _MACH_SA_ERRNO_H_
-
-extern int errno; /* global error number */
-
-/* ISO/ANSI C-1990 errors */
-#define EDOM 0xc001 /* Numerical argument out of domain */
-#define ERANGE 0xc002 /* Result too large */
-
-/* POSIX-1990 errors */
-#define E2BIG 0xc003 /* Argument list too long */
-#define EACCES 0xc004 /* Permission denied */
-#define EAGAIN 0xc005 /* Resource temporarily unavailable */
-#define EBADF 0xc006 /* Bad file descriptor */
-#define EBUSY 0xc007 /* Device busy */
-#define ECHILD 0xc008 /* No child processes */
-#define EDEADLK 0xc009 /* Resource deadlock avoided */
-#define EEXIST 0xc00a /* File exists */
-#define EFAULT 0xc00b /* Bad address */
-#define EFBIG 0xc00c /* File too large */
-#define EINTR 0xc00d /* Interrupted system call */
-#define EINVAL 0xc00e /* Invalid argument */
-#define EIO 0xc00f /* Input/output error */
-#define EISDIR 0xc010 /* Is a directory */
-#define EMFILE 0xc011 /* Too many open files */
-#define EMLINK 0xc012 /* Too many links */
-#define ENAMETOOLONG 0xc013 /* File name too long */
-#define ENFILE 0xc014 /* Too many open files in system */
-#define ENODEV 0xc015 /* Operation not supported by device */
-#define ENOENT 0xc016 /* No such file or directory */
-#define ENOEXEC 0xc017 /* Exec format error */
-#define ENOLCK 0xc018 /* No locks available */
-#define ENOMEM 0xc019 /* Cannot allocate memory */
-#define ENOSPC 0xc01a /* No space left on device */
-#define ENOSYS 0xc01b /* Function not implemented */
-#define ENOTDIR 0xc01c /* Not a directory */
-#define ENOTEMPTY 0xc01d /* Directory not empty */
-#define ENOTTY 0xc01e /* Inappropriate ioctl for device */
-#define ENXIO 0xc01f /* Device not configured */
-#define EPERM 0xc020 /* Operation not permitted */
-#define EPIPE 0xc021 /* Broken pipe */
-#define EROFS 0xc022 /* Read-only file system */
-#define ESPIPE 0xc023 /* Illegal seek */
-#define ESRCH 0xc024 /* No such process */
-#define EXDEV 0xc025 /* Cross-device link */
-
-/* POSIX-1993 errors */
-#define EBADMSG 0xc026
-#define ECANCELED 0xc027
-#define EINPROGRESS 0xc028
-#define EMSGSIZE 0xc029
-#define ENOTSUP 0xc02a
-
-#endif _MACH_SA_ERRNO_H_
diff --git a/include/mach/sa/fcntl.h b/include/mach/sa/fcntl.h
deleted file mode 100644
index ac86fe3..0000000
--- a/include/mach/sa/fcntl.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _MACH_SA_FCNTL_H_
-#define _MACH_SA_FCNTL_H_
-
-#include <sys/cdefs.h>
-
-#define O_ACCMODE 0x0003
-#define O_RDONLY 0x0000
-#define O_WRONLY 0x0001
-#define O_RDWR 0x0002
-
-#define O_CREAT 0x0010
-#define O_TRUNC 0x0020
-#define O_APPEND 0x0040
-#define O_EXCL 0x0080
-
-__BEGIN_DECLS
-
-int open(const char *__name, int __mode, ...);
-
-__END_DECLS
-
-#endif /* _MACH_SA_FCNTL_H_ */
diff --git a/include/mach/sa/limits.h b/include/mach/sa/limits.h
deleted file mode 100644
index f8dd03a..0000000
--- a/include/mach/sa/limits.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory (CSL). All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_LIMITS_H_
-#define _MACH_LIMITS_H_
-
-/* This file is valid for typical 32-bit machines;
- it should be overridden on 64-bit machines. */
-
-#define INT_MIN ((signed int)0x80000000)
-#define INT_MAX ((signed int)0x7fffffff)
-
-#define UINT_MIN ((unsigned int)0x00000000)
-#define UINT_MAX ((unsigned int)0xffffffff)
-
-#endif _MACH_LIMITS_H_
diff --git a/include/mach/sa/malloc.h b/include/mach/sa/malloc.h
deleted file mode 100644
index 3669046..0000000
--- a/include/mach/sa/malloc.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory (CSL). All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_SA_MALLOC_H_
-#define _MACH_SA_MALLOC_H_
-
-#include <mach/machine/vm_types.h>
-#include <sys/cdefs.h>
-
-#ifndef _SIZE_T
-#define _SIZE_T
-typedef natural_t size_t;
-#endif
-
-/* The malloc package in the base C library
- is implemented on top of the List Memory Manager,
- and the underlying memory pool can be manipulated
- directly with the LMM primitives using this lmm structure. */
-extern struct lmm malloc_lmm;
-
-__BEGIN_DECLS
-
-void *malloc(size_t size);
-void *calloc(size_t nelt, size_t eltsize);
-void *realloc(void *buf, size_t new_size);
-void free(void *buf);
-
-/* malloc() and realloc() call this routine when they're about to fail;
- it should try to scare up more memory and add it to the malloc_lmm.
- Returns nonzero if it succeeds in finding more memory. */
-int morecore(size_t size);
-
-__END_DECLS
-
-#endif _MACH_SA_MALLOC_H_
diff --git a/include/mach/sa/memory.h b/include/mach/sa/memory.h
deleted file mode 100644
index e2060ea..0000000
--- a/include/mach/sa/memory.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory (CSL). All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_MEMORY_H_
-#define _MACH_MEMORY_H_
-
-#include <string.h>
-
-#endif _MACH_MEMORY_H_
diff --git a/include/mach/sa/stddef.h b/include/mach/sa/stddef.h
deleted file mode 100644
index 9da5de0..0000000
--- a/include/mach/sa/stddef.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory (CSL). All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_STDDEF_H_
-#define _MACH_STDDEF_H_
-
-
-#endif _MACH_STDDEF_H_
diff --git a/include/mach/sa/stdio.h b/include/mach/sa/stdio.h
deleted file mode 100644
index d8f7201..0000000
--- a/include/mach/sa/stdio.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_SA_STDIO_H
-#define _MACH_SA_STDIO_H
-
-#include <sys/cdefs.h>
-
-/* This is a very naive standard I/O implementation
- which simply chains to the low-level I/O routines
- without doing any buffering or anything. */
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-typedef struct
-{
- int fd;
-} FILE;
-
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-
-#ifndef EOF
-#define EOF -1
-#endif
-
-__BEGIN_DECLS
-
-int putchar(int c);
-int puts(const char *str);
-int printf(const char *format, ...);
-int sprintf(char *dest, const char *format, ...);
-FILE *fopen(const char *path, const char *mode);
-int fclose(FILE *stream);
-int fread(void *buf, int size, int count, FILE *stream);
-int fwrite(void *buf, int size, int count, FILE *stream);
-int fputc(int c, FILE *stream);
-int fgetc(FILE *stream);
-int fprintf(FILE *stream, const char *format, ...);
-int fscanf(FILE *stream, const char *format, ...);
-int feof(FILE *stream);
-long ftell(FILE *stream);
-void rewind(FILE *stream);
-int rename(const char *from, const char *to);
-
-#define putc(c, stream) fputc(c, stream)
-
-__END_DECLS
-
-#endif _MACH_SA_STDIO_H
diff --git a/include/mach/sa/stdlib.h b/include/mach/sa/stdlib.h
deleted file mode 100644
index 29d3eaf..0000000
--- a/include/mach/sa/stdlib.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory (CSL). All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_SA_STDLIB_H_
-#define _MACH_SA_STDLIB_H_
-
-#include <mach/machine/vm_types.h>
-#include <sys/cdefs.h>
-
-#ifndef _SIZE_T
-#define _SIZE_T
-typedef natural_t size_t;
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-__BEGIN_DECLS
-
-int rand(void);
-
-long atol(const char *str);
-#define atoi(str) ((int)atol(str))
-
-#define abs(n) __builtin_abs(n)
-
-void exit(int status);
-
-void srand(unsigned seed);
-int rand(void);
-
-void *malloc(size_t size);
-void *calloc(size_t nelt, size_t eltsize);
-void *realloc(void *buf, size_t new_size);
-void free(void *buf);
-
-__END_DECLS
-
-#endif _MACH_SA_STDLIB_H_
diff --git a/include/mach/sa/string.h b/include/mach/sa/string.h
deleted file mode 100644
index 45fc137..0000000
--- a/include/mach/sa/string.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_STRING_H_
-#define _MACH_STRING_H_
-
-#include <sys/cdefs.h>
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-__BEGIN_DECLS
-
-__DECL(char *,strdup(const char *s));
-__DECL(char *,strcat(char *dest, const char *src));
-__DECL(int,strcmp(const char *a, const char *b));
-__DECL(int,strncpy(char *dest, const char *src, int n));
-__DECL(int,strncmp(const char *a, const char *b, int n));
-
-__DECL(char *,strchr(const char *s, int c));
-__DECL(char *,strrchr(const char *s, int c));
-__DECL(char *,index(const char *s, int c));
-__DECL(char *,rindex(const char *s, int c));
-__DECL(void *,strstr(const char *haystack, const char *needle));
-
-#ifndef __GNUC__
-__DECL(void *,memcpy(void *to, const void *from, unsigned int n));
-#endif
-__DECL(void *,memset(void *to, int ch, unsigned int n));
-
-__DECL(void,bcopy(const void *from, void *to, unsigned int n));
-__DECL(void,bzero(void *to, unsigned int n));
-
-__END_DECLS
-
-#endif _MACH_STRING_H_
diff --git a/include/mach/sa/strings.h b/include/mach/sa/strings.h
deleted file mode 100644
index 67b502e..0000000
--- a/include/mach/sa/strings.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_STRINGS_H_
-#define _MACH_STRINGS_H_
-
-#include <string.h>
-
-#endif _MACH_STRINGS_H_
diff --git a/include/mach/sa/sys/cdefs.h b/include/mach/sa/sys/cdefs.h
deleted file mode 100644
index 1e804ad..0000000
--- a/include/mach/sa/sys/cdefs.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-/*
- * Common private header file used by the mach/sa headers.
- * This header file does not cause any non-POSIX-reserved symbols to be defined.
- */
-#ifndef _MACH_SA_SYS_CDEFS_H_
-#define _MACH_SA_SYS_CDEFS_H_
-
-#ifdef __cplusplus
-#define __BEGIN_DECLS extern "C" {
-#define __END_DECLS }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-
-#ifndef __DECL
-#define __DECL(rettype, decl) \
- extern rettype __##decl; \
- extern rettype decl;
-#endif
-
-#ifndef __INLINE_FUNC
-#define __INLINE_FUNC static __inline
-#endif
-
-#endif /* _MACH_SA_SYS_CDEFS_H_ */
diff --git a/include/mach/sa/sys/ioctl.h b/include/mach/sa/sys/ioctl.h
deleted file mode 100644
index 732494d..0000000
--- a/include/mach/sa/sys/ioctl.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon rights
- * to redistribute these changes.
- */
-/*
- * Format definitions for 'ioctl' commands in device definitions.
- *
- * From BSD4.4.
- */
-
-#ifndef _MACH_SYS_IOCTL_H_
-#define _MACH_SYS_IOCTL_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 3 bits of the
- * upper word are used to encode the in/out status of the parameter.
- */
-#define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */
-#define IOC_VOID 0x20000000 /* no parameters */
-#define IOC_OUT 0x40000000 /* copy out parameters */
-#define IOC_IN 0x80000000U /* copy in parameters */
-#define IOC_INOUT (IOC_IN|IOC_OUT)
-
-#define _IOC(inout,group,num,len) \
- (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
-#define _IO(g,n) _IOC(IOC_VOID, (g), (n), 0)
-#define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t))
-#define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t))
-#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
-
-#endif _MACH_SYS_IOCTL_H_
diff --git a/include/mach/sa/sys/mman.h b/include/mach/sa/sys/mman.h
deleted file mode 100644
index 3400d30..0000000
--- a/include/mach/sa/sys/mman.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1994 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_SA_SYS_MMAN_H_
-#define _MACH_SA_SYS_MMAN_H_
-
-/*
- * Protections are chosen from these bits, or-ed together.
- * NB: These are the same values as the VM_PROT_xxx definitions,
- * and they can be used interchangeably.
- */
-#define PROT_READ 0x01 /* pages can be read */
-#define PROT_WRITE 0x02 /* pages can be written */
-#define PROT_EXEC 0x04 /* pages can be executed */
-
-/*
- * Flags for the mlockall() call.
- */
-#define MCL_CURRENT 0x0001 /* lock all currently mapped memory */
-#define MCL_FUTURE 0x0002 /* lock all memory mapped in the future */
-
-#endif _MACH_SA_SYS_MMAN_H_
diff --git a/include/mach/sa/sys/reboot.h b/include/mach/sa/sys/reboot.h
deleted file mode 100644
index d74ed98..0000000
--- a/include/mach/sa/sys/reboot.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1993,1991,1990 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-/*
- * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#)reboot.h 7.5 (Berkeley) 6/27/88
- */
-/*
- * Warning: The contents of this file are deprecated;
- * it should only ever be used for BSD and Mach 3 compatibility.
- * As the above copyright notice suggests, this file originated in BSD;
- * it is mostly the same, except the flags after RB_DFLTROOT
- * have diverged from BSD.
- */
-#ifndef _MACH_SYS_REBOOT_H_
-#define _MACH_SYS_REBOOT_H_
-
-/*
- * Arguments to reboot system call.
- * These are converted to switches, and passed to startup program,
- * and on to init.
- */
-#define RB_AUTOBOOT 0 /* flags for system auto-booting itself */
-
-#define RB_ASKNAME 0x01 /* -a: ask for file name to reboot from */
-#define RB_SINGLE 0x02 /* -s: reboot to single user only */
-#define RB_KDB 0x04 /* -d: kernel debugger symbols loaded */
-#define RB_HALT 0x08 /* -h: enter KDB at bootup */
- /* for host_reboot(): don't reboot,
- just halt */
-#define RB_INITNAME 0x10 /* -i: name given for /etc/init (unused) */
-#define RB_DFLTROOT 0x20 /* use compiled-in rootdev */
-#define RB_NOBOOTRC 0x20 /* -b: don't run /etc/rc.boot */
-#define RB_ALTBOOT 0x40 /* use /boot.old vs /boot */
-#define RB_UNIPROC 0x80 /* -u: start only one processor */
-
-#define RB_SHIFT 8 /* second byte is for ux */
-
-#define RB_DEBUGGER 0x1000 /* for host_reboot(): enter kernel
- debugger from user level */
-
-/* Corresponding BSD definitions, where they disagree with the Mach flags. */
-#define BSD_RB_NOSYNC 0x04 /* dont sync before reboot */
-#define BSD_RB_KDB 0x40 /* give control to kernel debugger */
-#define BSD_RB_RDONLY 0x80 /* mount root fs read-only */
-#define BSD_RB_DUMP 0x100 /* dump kernel memory before reboot */
-#define BSD_RB_MINIROOT 0x200 /* mini-root present in memory at boot time */
-#define BSD_RB_CONFIG 0x400 /* invoke user configuration routing */
-
-
-/*
- * Constants for converting boot-style device number to type,
- * adaptor (uba, mba, etc), unit number and partition number.
- * Type (== major device number) is in the low byte
- * for backward compatibility. Except for that of the "magic
- * number", each mask applies to the shifted value.
- * Format:
- * (4) (4) (4) (4) (8) (8)
- * --------------------------------
- * |MA | AD| CT| UN| PART | TYPE |
- * --------------------------------
- */
-#define B_ADAPTORSHIFT 24
-#define B_ADAPTORMASK 0x0f
-#define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
-#define B_CONTROLLERSHIFT 20
-#define B_CONTROLLERMASK 0xf
-#define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
-#define B_UNITSHIFT 16
-#define B_UNITMASK 0xf
-#define B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK)
-#define B_PARTITIONSHIFT 8
-#define B_PARTITIONMASK 0xff
-#define B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
-#define B_TYPESHIFT 0
-#define B_TYPEMASK 0xff
-#define B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK)
-
-#define B_MAGICMASK ((u_int)0xf0000000U)
-#define B_DEVMAGIC ((u_int)0xa0000000U)
-
-#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \
- (((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \
- ((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \
- ((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC)
-
-#endif /* _MACH_SYS_REBOOT_H_ */
diff --git a/include/mach/sa/sys/signal.h b/include/mach/sa/sys/signal.h
deleted file mode 100644
index c3c1206..0000000
--- a/include/mach/sa/sys/signal.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1989, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, 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.
- *
- * @(#)signal.h 8.2 (Berkeley) 1/21/94
- * signal.h,v 1.2 1994/08/02 07:53:32 davidg Exp
- */
-
-#ifndef _MACH_SA_SYS_SIGNAL_H_
-#define _MACH_SA_SYS_SIGNAL_H_
-
-#define NSIG 32 /* counting 0; could be 33 (mask is 1-32) */
-
-#define SIGHUP 1 /* hangup */
-#define SIGINT 2 /* interrupt */
-#define SIGQUIT 3 /* quit */
-#define SIGILL 4 /* illegal instruction (not reset when caught) */
-#ifndef _POSIX_SOURCE
-#define SIGTRAP 5 /* trace trap (not reset when caught) */
-#endif
-#define SIGABRT 6 /* abort() */
-#ifndef _POSIX_SOURCE
-#define SIGIOT SIGABRT /* compatibility */
-#define SIGEMT 7 /* EMT instruction */
-#endif
-#define SIGFPE 8 /* floating point exception */
-#define SIGKILL 9 /* kill (cannot be caught or ignored) */
-#ifndef _POSIX_SOURCE
-#define SIGBUS 10 /* bus error */
-#endif
-#define SIGSEGV 11 /* segmentation violation */
-#ifndef _POSIX_SOURCE
-#define SIGSYS 12 /* bad argument to system call */
-#endif
-#define SIGPIPE 13 /* write on a pipe with no one to read it */
-#define SIGALRM 14 /* alarm clock */
-#define SIGTERM 15 /* software termination signal from kill */
-#ifndef _POSIX_SOURCE
-#define SIGURG 16 /* urgent condition on IO channel */
-#endif
-#define SIGSTOP 17 /* sendable stop signal not from tty */
-#define SIGTSTP 18 /* stop signal from tty */
-#define SIGCONT 19 /* continue a stopped process */
-#define SIGCHLD 20 /* to parent on child stop or exit */
-#define SIGTTIN 21 /* to readers pgrp upon background tty read */
-#define SIGTTOU 22 /* like TTIN for output if (tp->t_local&LTOSTOP) */
-#ifndef _POSIX_SOURCE
-#define SIGIO 23 /* input/output possible signal */
-#define SIGXCPU 24 /* exceeded CPU time limit */
-#define SIGXFSZ 25 /* exceeded file size limit */
-#define SIGVTALRM 26 /* virtual time alarm */
-#define SIGPROF 27 /* profiling time alarm */
-#define SIGWINCH 28 /* window size changes */
-#define SIGINFO 29 /* information request */
-#endif
-#define SIGUSR1 30 /* user defined signal 1 */
-#define SIGUSR2 31 /* user defined signal 2 */
-
-#if defined(_ANSI_SOURCE) || defined(__cplusplus)
-/*
- * Language spec sez we must list exactly one parameter, even though we
- * actually supply three. Ugh!
- */
-#define SIG_DFL (void (*)(int))0
-#define SIG_IGN (void (*)(int))1
-#define SIG_ERR (void (*)(int))-1
-#else
-#define SIG_DFL (void (*)())0
-#define SIG_IGN (void (*)())1
-#define SIG_ERR (void (*)())-1
-#endif
-
-#ifndef _ANSI_SOURCE
-
-typedef unsigned int sigset_t;
-
-/*
- * POSIX 1003.1b: Generic value to pass back to an application.
- */
-union sigval
-{
- int sival_int;
- void *sival_ptr;
-};
-
-/*
- * This structure is passed to signal handlers
- * that use the new SA_SIGINFO calling convention (see below).
- */
-typedef struct
-{
- int si_signo;
- int si_code;
- union sigval si_value;
-} siginfo_t;
-
-/* Values for si_code, indicating the source of the signal */
-#define SI_USER 0 /* sent by kill(), raise(), or abort() */
-#define SI_QUEUE 1 /* sent by sigqueue() */
-#define SI_TIMER 2 /* generated by an expired timer */
-#define SI_ASYNCIO 3 /* generated by completion of an async i/o */
-#define SI_MESGQ 4 /* generated by the arrival of a message */
-#define SI_IRQ 5 /* hardware int dispatched to application */
-
-/*
- * Signal vector "template" used in sigaction call.
- */
-struct sigaction {
- union { /* signal handler */
- void (*sa_u_handler)();
- void (*sa_u_sigaction)(int, siginfo_t *, void *);
- } sa_u;
- sigset_t sa_mask; /* signal mask to apply */
- int sa_flags; /* see signal options below */
-};
-#define sa_handler sa_u.sa_u_handler
-#define sa_sigaction sa_u.sa_u_sigaction
-
-#ifndef _POSIX_SOURCE
-#define SA_ONSTACK 0x0001 /* take signal on signal stack */
-#define SA_RESTART 0x0002 /* restart system on signal return */
-#define SA_DISABLE 0x0004 /* disable taking signals on alternate stack */
-#ifdef COMPAT_SUNOS
-#define SA_USERTRAMP 0x0100 /* do not bounce off kernel's sigtramp */
-#endif
-#endif
-#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
-#define SA_SIGINFO 0x0010 /* use sa_sigaction calling convention */
-
-/*
- * Flags for sigprocmask:
- */
-#define SIG_BLOCK 1 /* block specified signal set */
-#define SIG_UNBLOCK 2 /* unblock specified signal set */
-#define SIG_SETMASK 3 /* set specified signal set */
-
-/*
- * POSIX 1003.1b:
- * Used when requesting queued notification of an event,
- * such as a timer expiration or a message arrival.
- */
-struct sigevent
-{
- int sigev_notify;
- union
- {
- struct
- {
- int __signo;
- union sigval __value;
- } __sig;
- struct
- {
- void (*__handler)(void);
- void *__stack;
- } __fastint;
- } __u;
-};
-
-#define sigev_signo __u.__sig.__signo
-#define sigev_value __u.__sig.__value
-
-#define sigev_handler __u.__fastint.__handler
-#define sigev_stack __u.__fastint.__stack
-
-/* Values for sigev_notify */
-#define SIGEV_NONE 0
-#define SIGEV_SIGNAL 1
-#define SIGEV_FASTINT 2
-
-#endif /* !_ANSI_SOURCE */
-
-#endif /* !_MACH_SA_SYS_SIGNAL_H_ */
diff --git a/include/mach/sa/sys/stat.h b/include/mach/sa/sys/stat.h
deleted file mode 100644
index 81ca25d..0000000
--- a/include/mach/sa/sys/stat.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, 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.
- *
- * @(#)stat.h 8.6 (Berkeley) 3/8/94
- * stat.h,v 1.5 1994/10/02 17:24:57 phk Exp
- */
-
-#ifndef _MACH_SA_SYS_STAT_H_
-#define _MACH_SA_SYS_STAT_H_
-
-#include <sys/types.h>
-
-/*
- * XXX we need this for struct timespec. We get miscellaneous namespace
- * pollution with it. struct timespace itself is namespace pollution if
- * _POSIX_SOURCE is defined.
- */
-#include <sys/time.h>
-
-struct stat {
- dev_t st_dev; /* inode's device */
- ino_t st_ino; /* inode's number */
- mode_t st_mode; /* inode protection mode */
- nlink_t st_nlink; /* number of hard links */
- uid_t st_uid; /* user ID of the file's owner */
- gid_t st_gid; /* group ID of the file's group */
- dev_t st_rdev; /* device type */
- time_t st_atime; /* time of last access */
- time_t st_mtime; /* time of last data modification */
- time_t st_ctime; /* time of last file status change */
- off_t st_size; /* file size, in bytes */
- unsigned long st_blocks; /* blocks allocated for file */
- unsigned long st_blksize; /* optimal blocksize for I/O */
-};
-
-#define S_ISUID 0004000 /* set user id on execution */
-#define S_ISGID 0002000 /* set group id on execution */
-#ifndef _POSIX_SOURCE
-#define S_ISTXT 0001000 /* sticky bit */
-#endif
-
-#define S_IRWXU 0000700 /* RWX mask for owner */
-#define S_IRUSR 0000400 /* R for owner */
-#define S_IWUSR 0000200 /* W for owner */
-#define S_IXUSR 0000100 /* X for owner */
-
-#define S_IRWXG 0000070 /* RWX mask for group */
-#define S_IRGRP 0000040 /* R for group */
-#define S_IWGRP 0000020 /* W for group */
-#define S_IXGRP 0000010 /* X for group */
-
-#define S_IRWXO 0000007 /* RWX mask for other */
-#define S_IROTH 0000004 /* R for other */
-#define S_IWOTH 0000002 /* W for other */
-#define S_IXOTH 0000001 /* X for other */
-
-#ifndef _POSIX_SOURCE
-#define S_IFMT 0170000 /* type of file mask */
-#define S_IFIFO 0010000 /* named pipe (fifo) */
-#define S_IFCHR 0020000 /* character special */
-#define S_IFDIR 0040000 /* directory */
-#define S_IFBLK 0060000 /* block special */
-#define S_IFREG 0100000 /* regular */
-#define S_IFLNK 0120000 /* symbolic link */
-#define S_IFSOCK 0140000 /* socket */
-#define S_ISVTX 0001000 /* save swapped text even after use */
-#endif
-
-#define S_ISDIR(m) (((m) & 0170000) == 0040000) /* directory */
-#define S_ISCHR(m) (((m) & 0170000) == 0020000) /* char special */
-#define S_ISBLK(m) (((m) & 0170000) == 0060000) /* block special */
-#define S_ISREG(m) (((m) & 0170000) == 0100000) /* regular file */
-#define S_ISFIFO(m) (((m) & 0170000) == 0010000 || \
- ((m) & 0170000) == 0140000) /* fifo or socket */
-#ifndef _POSIX_SOURCE
-#define S_ISLNK(m) (((m) & 0170000) == 0120000) /* symbolic link */
-#define S_ISSOCK(m) (((m) & 0170000) == 0010000 || \
- ((m) & 0170000) == 0140000) /* fifo or socket */
-#endif
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int chmod(const char *, mode_t);
-int fstat(int, struct stat *);
-int mkdir(const char *, mode_t);
-int mkfifo(const char *, mode_t);
-int stat(const char *, struct stat *);
-mode_t umask(mode_t);
-__END_DECLS
-
-#endif /* !_MACH_SA_SYS_STAT_H_ */
diff --git a/include/mach/sa/sys/termios.h b/include/mach/sa/sys/termios.h
deleted file mode 100644
index 2d2e4bd..0000000
--- a/include/mach/sa/sys/termios.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 1988, 1989, 1993, 1994
- * 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.
- *
- * @(#)termios.h 8.3 (Berkeley) 3/28/94
- * termios.h,v 1.3 1994/08/02 07:53:46 davidg Exp
- */
-
-#ifndef _MACH_SA_SYS_TERMIOS_H_
-#define _MACH_SA_SYS_TERMIOS_H_
-
-/*
- * Special Control Characters
- *
- * Index into c_cc[] character array.
- *
- * Name Subscript Enabled by
- */
-#define VEOF 0 /* ICANON */
-#define VEOL 1 /* ICANON */
-#define VERASE 3 /* ICANON */
-#define VKILL 5 /* ICANON */
-#define VINTR 8 /* ISIG */
-#define VQUIT 9 /* ISIG */
-#define VSUSP 10 /* ISIG */
-#define VSTART 12 /* IXON, IXOFF */
-#define VSTOP 13 /* IXON, IXOFF */
-#define VMIN 16 /* !ICANON */
-#define VTIME 17 /* !ICANON */
-#define NCCS 20
-
-#define _POSIX_VDISABLE ((unsigned char)'\377')
-
-/*
- * Input flags - software input processing
- */
-#define IGNBRK 0x00000001 /* ignore BREAK condition */
-#define BRKINT 0x00000002 /* map BREAK to SIGINTR */
-#define IGNPAR 0x00000004 /* ignore (discard) parity errors */
-#define PARMRK 0x00000008 /* mark parity and framing errors */
-#define INPCK 0x00000010 /* enable checking of parity errors */
-#define ISTRIP 0x00000020 /* strip 8th bit off chars */
-#define INLCR 0x00000040 /* map NL into CR */
-#define IGNCR 0x00000080 /* ignore CR */
-#define ICRNL 0x00000100 /* map CR to NL (ala CRMOD) */
-#define IXON 0x00000200 /* enable output flow control */
-#define IXOFF 0x00000400 /* enable input flow control */
-#ifndef _POSIX_SOURCE
-#define IXANY 0x00000800 /* any char will restart after stop */
-#define IMAXBEL 0x00002000 /* ring bell on input queue full */
-#endif /*_POSIX_SOURCE */
-
-/*
- * Output flags - software output processing
- */
-#define OPOST 0x00000001 /* enable following output processing */
-
-/*
- * Control flags - hardware control of terminal
- */
-#ifndef _POSIX_SOURCE
-#define CIGNORE 0x00000001 /* ignore control flags */
-#endif
-#define CSIZE 0x00000300 /* character size mask */
-#define CS5 0x00000000 /* 5 bits (pseudo) */
-#define CS6 0x00000100 /* 6 bits */
-#define CS7 0x00000200 /* 7 bits */
-#define CS8 0x00000300 /* 8 bits */
-#define CSTOPB 0x00000400 /* send 2 stop bits */
-#define CREAD 0x00000800 /* enable receiver */
-#define PARENB 0x00001000 /* parity enable */
-#define PARODD 0x00002000 /* odd parity, else even */
-#define HUPCL 0x00004000 /* hang up on last close */
-#define CLOCAL 0x00008000 /* ignore modem status lines */
-
-
-/*
- * "Local" flags - dumping ground for other state
- *
- * Warning: some flags in this structure begin with
- * the letter "I" and look like they belong in the
- * input flag.
- */
-
-#define ECHOE 0x00000002 /* visually erase chars */
-#define ECHOK 0x00000004 /* echo NL after line kill */
-#define ECHO 0x00000008 /* enable echoing */
-#define ECHONL 0x00000010 /* echo NL even if ECHO is off */
-#define ISIG 0x00000080 /* enable signals INTR, QUIT, [D]SUSP */
-#define ICANON 0x00000100 /* canonicalize input lines */
-#define IEXTEN 0x00000400 /* enable DISCARD and LNEXT */
-#define EXTPROC 0x00000800 /* external processing */
-#define TOSTOP 0x00400000 /* stop background jobs from output */
-#ifndef _POSIX_SOURCE
-#define FLUSHO 0x00800000 /* output being flushed (state) */
-#define NOKERNINFO 0x02000000 /* no kernel output from VSTATUS */
-#define PENDIN 0x20000000 /* XXX retype pending input (state) */
-#endif /*_POSIX_SOURCE */
-#define NOFLSH 0x80000000 /* don't flush after interrupt */
-
-typedef unsigned long tcflag_t;
-typedef unsigned char cc_t;
-typedef long speed_t;
-
-struct termios {
- tcflag_t c_iflag; /* input flags */
- tcflag_t c_oflag; /* output flags */
- tcflag_t c_cflag; /* control flags */
- tcflag_t c_lflag; /* local flags */
- cc_t c_cc[NCCS]; /* control chars */
- long c_ispeed; /* input speed */
- long c_ospeed; /* output speed */
-};
-
-/*
- * Commands passed to tcsetattr() for setting the termios structure.
- */
-#define TCSANOW 0 /* make change immediate */
-#define TCSADRAIN 1 /* drain output, then change */
-#define TCSAFLUSH 2 /* drain output, flush input */
-#ifndef _POSIX_SOURCE
-#define TCSASOFT 0x10 /* flag - don't alter h.w. state */
-#endif
-
-/*
- * Standard speeds
- */
-#define B0 0
-#define B50 50
-#define B75 75
-#define B110 110
-#define B134 134
-#define B150 150
-#define B200 200
-#define B300 300
-#define B600 600
-#define B1200 1200
-#define B1800 1800
-#define B2400 2400
-#define B4800 4800
-#define B9600 9600
-#define B19200 19200
-#define B38400 38400
-#ifndef _POSIX_SOURCE
-#define B7200 7200
-#define B14400 14400
-#define B28800 28800
-#define B57600 57600
-#define B76800 76800
-#define B115200 115200
-#define B230400 230400
-#define EXTA 19200
-#define EXTB 38400
-#endif /* !_POSIX_SOURCE */
-
-#define TCIFLUSH 1
-#define TCOFLUSH 2
-#define TCIOFLUSH 3
-#define TCOOFF 1
-#define TCOON 2
-#define TCIOFF 3
-#define TCION 4
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-speed_t cfgetispeed(const struct termios *);
-speed_t cfgetospeed(const struct termios *);
-int cfsetispeed(struct termios *, speed_t);
-int cfsetospeed(struct termios *, speed_t);
-int tcgetattr(int, struct termios *);
-int tcsetattr(int, int, const struct termios *);
-int tcdrain(int);
-int tcflow(int, int);
-int tcflush(int, int);
-int tcsendbreak(int, int);
-__END_DECLS
-
-#endif /* !_MACH_SA_SYS_TERMIOS_H_ */
diff --git a/include/mach/sa/sys/time.h b/include/mach/sa/sys/time.h
deleted file mode 100644
index ab96678..0000000
--- a/include/mach/sa/sys/time.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon rights
- * to redistribute these changes.
- */
-/*
- * Time-keeper for kernel IO devices.
- *
- * May or may not have any relation to wall-clock time.
- */
-
-#ifndef _MACH_SA_SYS_TIME_H_
-#define _MACH_SA_SYS_TIME_H_
-
-#include <mach/time_value.h>
-
-extern time_value_t time;
-
-/*
- * Definitions to keep old code happy.
- */
-#define timeval_t time_value_t
-#define timeval time_value
-#define tv_sec seconds
-#define tv_usec microseconds
-
-#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 _MACH_SA_SYS_TIME_H_
diff --git a/include/mach/sa/sys/types.h b/include/mach/sa/sys/types.h
deleted file mode 100644
index 6973f89..0000000
--- a/include/mach/sa/sys/types.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1993 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-#ifndef _MACH_SA_SYS_TYPES_H_
-#define _MACH_SA_SYS_TYPES_H_
-
-#include <mach/machine/vm_types.h>
-
-#ifndef _SIZE_T
-#define _SIZE_T
-typedef natural_t size_t;
-#endif
-
-#ifndef _SSIZE_T
-#define _SSIZE_T
-typedef integer_t ssize_t;
-#endif
-
-typedef unsigned short dev_t; /* device id */
-typedef unsigned long gid_t; /* group id */
-typedef unsigned long ino_t; /* inode number */
-typedef unsigned short mode_t; /* permissions */
-typedef unsigned short nlink_t; /* link count */
-typedef natural_t off_t; /* file offset */
-typedef unsigned long uid_t; /* user id */
-
-
-/* Symbols allowed but not required by POSIX */
-
-typedef char * caddr_t; /* address of a (signed) char */
-
-#ifndef _TIME_T
-#define _TIME_T
-typedef unsigned int time_t;
-#endif
-
-#define RAND_MAX 0x7fffffff
-
-/* Symbols not allowed by POSIX */
-#ifndef _POSIX_SOURCE
-
-/*
- * Common type definitions that lots of old files seem to want.
- */
-
-typedef unsigned char u_char; /* unsigned char */
-typedef unsigned short u_short; /* unsigned short */
-typedef unsigned int u_int; /* unsigned int */
-typedef unsigned long u_long; /* unsigned long */
-
-typedef struct _quad_ {
- unsigned int val[2]; /* 2 32-bit values make... */
-} quad; /* an 8-byte item */
-
-typedef unsigned int daddr_t; /* disk address */
-
-#define major(i) (((i) >> 8) & 0xFF)
-#define minor(i) ((i) & 0xFF)
-#define makedev(i,j) ((((i) & 0xFF) << 8) | ((j) & 0xFF))
-
-#define NBBY 8
-
-#ifndef NULL
-#define NULL ((void *) 0) /* the null pointer */
-#endif
-
-#endif /* _POSIX_SOURCE */
-
-#endif /* _MACH_SA_SYS_TYPES_H_ */
diff --git a/include/mach/sa/time.h b/include/mach/sa/time.h
deleted file mode 100644
index 2f02622..0000000
--- a/include/mach/sa/time.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 1995 The University of Utah and
- * the Computer Systems Laboratory at the University of Utah (CSL).
- * All rights reserved.
- *
- * Permission to use, copy, modify and distribute this software is hereby
- * granted provided that (1) source code retains these copyright, permission,
- * and disclaimer notices, and (2) redistributions including binaries
- * reproduce the notices in supporting documentation, and (3) all advertising
- * materials mentioning features or use of this software display the following
- * acknowledgement: ``This product includes software developed by the
- * Computer Systems Laboratory at the University of Utah.''
- *
- * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
- * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
- * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * CSL requests users of this software to return to csl-dist@cs.utah.edu any
- * improvements that they make and grant CSL redistribution rights.
- *
- * Author: Bryan Ford, University of Utah CSL
- */
-#ifndef _MACH_SA_TIME_H
-#define _MACH_SA_TIME_H
-
-#endif /* _MACH_SA_TIME_H */
diff --git a/include/mach/sa/unistd.h b/include/mach/sa/unistd.h
deleted file mode 100644
index d3c313d..0000000
--- a/include/mach/sa/unistd.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _UNISTD_H_
-#define _UNISTD_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-__BEGIN_DECLS
-
-__DECL(int,close(int fd));
-__DECL(int,read(int fd, void *buf, unsigned int n));
-__DECL(int,write(int fd, const void *buf, unsigned int n));
-__DECL(off_t,lseek(int fd, off_t offset, int whence));
-__DECL(int,rename(const char *oldpath, const char *newpath));
-__DECL(void *,sbrk(int size));
-
-__END_DECLS
-
-#endif /* _UNISTD_H_ */