rktio: remove obsolete preprocessor definitions
Many have moved to rktio, and others became irrelevant over the decades.
This commit is contained in:
parent
c4b3b19c1e
commit
d72a04285d
|
@ -111,11 +111,6 @@ both:
|
|||
$(MAKE) cgc-core
|
||||
$(MAKE) 3m
|
||||
|
||||
oskit:
|
||||
$(MAKE) common
|
||||
$(MAKE) mzlibrary
|
||||
$(MAKE) racket.multiboot
|
||||
|
||||
racketlib:
|
||||
$(MAKE) g-c
|
||||
$(MAKE) @FOREIGNTARGET@
|
||||
|
@ -254,18 +249,6 @@ mzcom@CGC@@MINGW@: libracket.dll.a libmzgc.dll.a mzcom.@LTO@ mzobj.@LTO@ com_glu
|
|||
comres.o : $(srcdir)/../worksp/mzcom/mzcom.rc $(srcdir)/../mzcom/prebuilt/MzCOM.tlb
|
||||
@WINDRES@ -I $(srcdir)/../mzcom -I $(srcdir)/../mzcom/prebuilt -i $(srcdir)/../worksp/mzcom/mzcom.rc -o comres.o
|
||||
|
||||
# OSKit ----------------------------------------
|
||||
|
||||
racket.multiboot : libracket.@LIBSFX@ libmzgc.@LIBSFX@ main.@LTO@
|
||||
$(LD) -Ttext 100000 $(LDFLAGS) @OSKHOME@/lib/oskit/multiboot.@LTO@ \
|
||||
-o racket.multiboot main.@LTO@ -L. -lracket -lgc \
|
||||
-L@OSKHOME@/lib -loskit_kern -loskit_clientos @EXTRA_OSK_LIBS@ \
|
||||
-loskit_freebsd_c -loskit_c -loskit_lmm \
|
||||
-loskit_freebsd_m -loskit_memfs -loskit_fsnamespace \
|
||||
-loskit_dev -loskit_com \
|
||||
-loskit_kern -loskit_freebsd_c -loskit_c \
|
||||
@OSKHOME@/lib/oskit/crtn.@LTO@
|
||||
|
||||
# ----------------------------------------
|
||||
|
||||
DEF_COLLECTS_DIR = -DINITIAL_COLLECTS_DIRECTORY='"'"`cd $(srcdir)/../../collects; @PWD@`"'"'
|
||||
|
@ -274,7 +257,7 @@ DEF_C_DIRS = $(DEF_COLLECTS_DIR) $(DEF_CONFIG_DIR)
|
|||
|
||||
MAIN_HEADER_DEPS = $(srcdir)/include/scheme.h $(srcdir)/include/schthread.h $(srcdir)/sconfig.h \
|
||||
$(srcdir)/src/stypes.h $(srcdir)/cmdline.inc $(srcdir)/parse_cmdl.inc \
|
||||
$(srcdir)/oskglue.inc $(srcdir)/delayed.inc $(srcdir)/parse_cmdl.inc
|
||||
$(srcdir)/delayed.inc $(srcdir)/parse_cmdl.inc
|
||||
|
||||
main.@LTO@: $(srcdir)/main.c $(MAIN_HEADER_DEPS)
|
||||
$(CC) -I$(builddir) -I$(srcdir)/include $(CFLAGS) $(CPPFLAGS) @OPTIONS@ @MZOPTIONS@ $(DEF_C_DIRS) -c $(srcdir)/main.c -o main.@LTO@
|
||||
|
|
|
@ -881,7 +881,6 @@ static Scheme_Object *adjust_collects_path(Scheme_Object *collects_path, int *_s
|
|||
|
||||
static Scheme_Object *adjust_config_path(Scheme_Object *config_path)
|
||||
{
|
||||
# ifdef GETENV_FUNCTION
|
||||
if (!config_path) {
|
||||
char *s;
|
||||
s = getenv("PLTCONFIGDIR");
|
||||
|
@ -890,7 +889,6 @@ static Scheme_Object *adjust_config_path(Scheme_Object *config_path)
|
|||
if (s) config_path = scheme_make_path(s);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
if (!config_path)
|
||||
config_path = scheme_make_path(scheme_configdir XFORM_OK_PLUS _configdir_offset);
|
||||
|
@ -941,9 +939,7 @@ static int run_from_cmd_line(int argc, char *_argv[],
|
|||
Scheme_Object *config_path = NULL;
|
||||
Scheme_Object *host_collects_path = NULL, *host_config_path = NULL;
|
||||
char *compiled_paths = NULL;
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
Scheme_Object *collects_paths_l, *collects_paths_r;
|
||||
#endif
|
||||
#ifndef DONT_PARSE_COMMAND_LINE
|
||||
char **evals_and_loads, *real_switch = NULL, specific_switch[2];
|
||||
int *eval_kind, num_enl;
|
||||
|
@ -1585,23 +1581,11 @@ static int run_from_cmd_line(int argc, char *_argv[],
|
|||
)
|
||||
#endif
|
||||
PRINTF("%s", BANNER);
|
||||
#ifdef RACKET_CMD_LINE
|
||||
# ifdef DOS_FILE_SYSTEM
|
||||
# if !defined(FILES_HAVE_FDS)
|
||||
# if !defined(WINDOWS_FILE_HANDLES)
|
||||
PRINTF("Warning: read-eval-print-loop or read on a stream port may block threads.\n");
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(USE_FD_PORTS) || defined(WINDOWS_FILE_HANDLES)
|
||||
CMDLINE_FFLUSH(stdout);
|
||||
#endif
|
||||
}
|
||||
#endif /* DONT_PARSE_COMMAND_LINE */
|
||||
|
||||
#ifdef GETENV_FUNCTION
|
||||
if (!syslog_level) {
|
||||
char *s;
|
||||
s = getenv("PLTSYSLOG");
|
||||
|
@ -1653,11 +1637,9 @@ static int run_from_cmd_line(int argc, char *_argv[],
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
scheme_set_logging_spec(syslog_level, stderr_level);
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
collects_path = adjust_collects_path(collects_path, &skip_coll_dirs);
|
||||
scheme_set_collects_path(collects_path);
|
||||
|
||||
|
@ -1694,7 +1676,6 @@ static int run_from_cmd_line(int argc, char *_argv[],
|
|||
}
|
||||
collects_paths_l = reverse_path_list(collects_paths_l, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
sch_argv = create_cmdline_args_vector(argc, argv);
|
||||
scheme_set_command_line_arguments(sch_argv);
|
||||
|
@ -1711,18 +1692,12 @@ static int run_from_cmd_line(int argc, char *_argv[],
|
|||
if (no_compiled)
|
||||
scheme_set_compiled_file_paths(scheme_make_null());
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
/* Setup compiled-file search path: */
|
||||
# ifdef GETENV_FUNCTION
|
||||
if (!compiled_paths) {
|
||||
compiled_paths = getenv("PLTCOMPILEDROOTS");
|
||||
}
|
||||
# endif
|
||||
#endif /* NO_FILE_SYSTEM_UTILS */
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
/* Setup path for "addon" directory: */
|
||||
# ifdef GETENV_FUNCTION
|
||||
if (!addon_dir) {
|
||||
char *s;
|
||||
s = getenv("PLTADDONDIR");
|
||||
|
@ -1731,22 +1706,18 @@ static int run_from_cmd_line(int argc, char *_argv[],
|
|||
if (s) addon_dir = scheme_make_path(s);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
if (addon_dir) {
|
||||
addon_dir = scheme_path_to_complete_path(addon_dir, NULL);
|
||||
scheme_set_addon_dir(addon_dir);
|
||||
}
|
||||
#endif /* NO_FILE_SYSTEM_UTILS */
|
||||
|
||||
/* Creates the main kernel environment */
|
||||
global_env = mk_basic_env();
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
if (!skip_coll_dirs)
|
||||
scheme_init_collection_paths_post(global_env, collects_paths_l, collects_paths_r);
|
||||
if (compiled_paths)
|
||||
scheme_init_compiled_roots(global_env, compiled_paths);
|
||||
#endif
|
||||
|
||||
scheme_seal_parameters();
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ EXPORTS
|
|||
scheme_add_flush
|
||||
scheme_remove_flush
|
||||
scheme_add_atexit_closer
|
||||
scheme_atexit
|
||||
scheme_add_evt
|
||||
scheme_add_evt_through_sema
|
||||
scheme_is_evt
|
||||
|
|
|
@ -49,14 +49,12 @@
|
|||
#ifdef MZ_PRECISE_GC
|
||||
# define MUST_REGISTER_GLOBALS
|
||||
# define MZTAG_REQUIRED
|
||||
# undef UNIX_IMAGE_DUMPS
|
||||
/* In case SGC is used to build PRECISE_GC: */
|
||||
# undef USE_SENORA_GC
|
||||
#endif
|
||||
|
||||
#ifdef USE_SENORA_GC
|
||||
# define MUST_REGISTER_GLOBALS
|
||||
# undef UNIX_IMAGE_DUMPS
|
||||
#endif
|
||||
|
||||
#ifdef USE_SINGLE_FLOATS
|
||||
|
@ -213,12 +211,6 @@ typedef jmpbuf jmp_buf[1];
|
|||
|
||||
#define GC_MIGHT_USE_REGISTERED_STATICS
|
||||
|
||||
#ifdef MACINTOSH_EVENTS
|
||||
/* We avoid #including the Carbon headers because we only
|
||||
need a few abstract struct types: */
|
||||
typedef struct FSSpec mzFSSpec;
|
||||
#endif
|
||||
|
||||
#ifndef MZ_DONT_USE_JIT
|
||||
# if defined(MZ_USE_JIT_PPC) || defined(MZ_USE_JIT_I386) || defined(MZ_USE_JIT_X86_64) || defined(MZ_USE_JIT_ARM)
|
||||
# define MZ_USE_JIT
|
||||
|
@ -1956,9 +1948,6 @@ MZ_EXTERN void (*scheme_suspend_main_thread)(void);
|
|||
int scheme_set_in_main_thread(void);
|
||||
void scheme_restore_nonmain_thread(void);
|
||||
#endif
|
||||
#ifdef MAC_FILE_SYSTEM
|
||||
extern long scheme_creator_id;
|
||||
#endif
|
||||
|
||||
typedef Scheme_Object *(*Scheme_Stdio_Maker_Proc)(void);
|
||||
MZ_EXTERN Scheme_Object *(*scheme_make_stdin)(void);
|
||||
|
|
|
@ -195,9 +195,6 @@ typedef struct Thread_Local_Variables {
|
|||
struct Scheme_Object *scheme_orig_stderr_port_;
|
||||
struct Scheme_Object *scheme_orig_stdin_port_;
|
||||
struct rktio_ltps_t *scheme_semaphore_fd_set_;
|
||||
#ifdef USE_FCNTL_AND_FORK_FOR_FILE_LOCKS
|
||||
struct Scheme_Hash_Table *locked_fd_process_map_;
|
||||
#endif
|
||||
struct Scheme_Custodian *new_port_cust_;
|
||||
char *read_string_byte_buffer_;
|
||||
struct ITimer_Data *itimerdata_;
|
||||
|
@ -592,7 +589,6 @@ XFORM_GC_VARIABLE_STACK_THROUGH_THREAD_LOCAL;
|
|||
#define scheme_orig_stderr_port XOA (scheme_get_thread_local_variables()->scheme_orig_stderr_port_)
|
||||
#define scheme_orig_stdin_port XOA (scheme_get_thread_local_variables()->scheme_orig_stdin_port_)
|
||||
#define scheme_semaphore_fd_set XOA (scheme_get_thread_local_variables()->scheme_semaphore_fd_set_)
|
||||
#define locked_fd_process_map XOA (scheme_get_thread_local_variables()->locked_fd_process_map_)
|
||||
#define new_port_cust XOA (scheme_get_thread_local_variables()->new_port_cust_)
|
||||
#define read_string_byte_buffer XOA (scheme_get_thread_local_variables()->read_string_byte_buffer_)
|
||||
#define itimerdata XOA (scheme_get_thread_local_variables()->itimerdata_)
|
||||
|
|
|
@ -61,17 +61,12 @@ XFORM_GC_VARIABLE_STACK_THROUGH_DIRECT_FUNCTION;
|
|||
START_XFORM_SUSPEND;
|
||||
#endif
|
||||
|
||||
#ifdef FILES_HAVE_FDS
|
||||
# include <sys/types.h>
|
||||
# include <sys/time.h>
|
||||
# ifdef SELECT_INCLUDE
|
||||
# include <sys/select.h>
|
||||
# endif
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#ifndef NO_USER_BREAK_HANDLER
|
||||
# include <signal.h>
|
||||
#endif
|
||||
#ifdef UNISTD_INCLUDE
|
||||
#ifdef OS_X
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
@ -188,14 +183,10 @@ extern Scheme_Object *scheme_initialize(Scheme_Env *env);
|
|||
# define INITIAL_NAMESPACE_MODULE "racket/init"
|
||||
#endif
|
||||
|
||||
#ifdef EXPAND_FILENAME_TILDE
|
||||
# define INIT_FILENAME UNIX_INIT_FILENAME
|
||||
#ifdef DOS_FILE_SYSTEM
|
||||
# define INIT_FILENAME WINDOWS_INIT_FILENAME
|
||||
#else
|
||||
# ifdef DOS_FILE_SYSTEM
|
||||
# define INIT_FILENAME WINDOWS_INIT_FILENAME
|
||||
# else
|
||||
# define INIT_FILENAME MACOS9_INIT_FILENAME
|
||||
# endif
|
||||
# define INIT_FILENAME UNIX_INIT_FILENAME
|
||||
#endif
|
||||
|
||||
#define CMDLINE_FFLUSH fflush
|
||||
|
@ -227,12 +218,6 @@ void set_os_process_name(char *sprog)
|
|||
|
||||
#include "cmdline.inc"
|
||||
|
||||
/*========================================================================*/
|
||||
/* OSKit glue */
|
||||
/*========================================================================*/
|
||||
|
||||
#include "oskglue.inc"
|
||||
|
||||
/*========================================================================*/
|
||||
/* ctl-C handler */
|
||||
/*========================================================================*/
|
||||
|
@ -425,10 +410,6 @@ static int main_after_stack(void *data)
|
|||
argc = ((Main_Args *)data)->argc;
|
||||
MAIN_argv = ((Main_Args *)data)->argv;
|
||||
|
||||
#if defined(OSKIT) && !defined(OSKIT_TEST) && !KNIT
|
||||
oskit_prepare(&argc, &argv);
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS_UNICODE_MAIN
|
||||
{
|
||||
char *a;
|
||||
|
|
|
@ -1,314 +0,0 @@
|
|||
#if defined(OSKIT) && !defined(OSKIT_TEST) && !KNIT
|
||||
|
||||
# include <oskit/clientos.h>
|
||||
# include <oskit/dev/osenv.h>
|
||||
# include <oskit/fs/memfs.h>
|
||||
# include <oskit/dev/clock.h>
|
||||
# include <oskit/c/sys/time.h>
|
||||
# include <oskit/x86/pc/dev.h>
|
||||
# ifdef USE_OSKIT_CONSOLE
|
||||
# include <oskit/x86/pc/direct_cons.h>
|
||||
# else
|
||||
# include <oskit/dev/freebsd.h>
|
||||
# endif
|
||||
|
||||
static oskit_osenv_t *osenv;
|
||||
|
||||
void start_clock()
|
||||
{
|
||||
# define LOCAL_TO_GMT(t) /* (t)->tv_sec += secondswest */
|
||||
oskit_timespec_t time;
|
||||
/* use fdev's default clock device */
|
||||
oskit_clock_t *clock = oskit_clock_init();
|
||||
|
||||
oskit_rtc_get(&time); /* read rtc */
|
||||
LOCAL_TO_GMT(&time); /* adjust for local time */
|
||||
oskit_clock_settime(clock, &time); /* set time */
|
||||
|
||||
oskit_register(&oskit_clock_iid, (void *) clock);
|
||||
}
|
||||
|
||||
void start_memfs()
|
||||
{
|
||||
oskit_error_t err;
|
||||
oskit_filesystem_t *fs;
|
||||
oskit_dir_t *root;
|
||||
oskit_fsnamespace_t *fsnamespace;
|
||||
|
||||
# define CHECK(what, f) \
|
||||
if ((err = f)) { printf("in-memory filesystem init error at " what ": %x\n", err); return; }
|
||||
|
||||
CHECK("memfs", oskit_memfs_init(osenv, &fs));
|
||||
CHECK("getroot", oskit_filesystem_getroot(fs, &root));
|
||||
CHECK("fsnamespace", oskit_create_fsnamespace(root, root, &fsnamespace));
|
||||
CHECK("setfsnamespace",oskit_clientos_setfsnamespace(fsnamespace));
|
||||
|
||||
#undef CHECK
|
||||
}
|
||||
|
||||
oskit_error_t fs_gettime(struct oskit_timespec *tsp)
|
||||
{
|
||||
struct timeval now;
|
||||
gettimeofday(&now, NULL);
|
||||
|
||||
tsp->tv_sec = now.tv_sec;
|
||||
tsp->tv_nsec = now.tv_usec * 1000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int gethostname(char *s, int len)
|
||||
{
|
||||
strncpy(s, "racket-machine", len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void reset_console_input(void)
|
||||
{
|
||||
/* So the "press any key to reboot" works: */
|
||||
direct_cons_set_flags(0);
|
||||
}
|
||||
|
||||
/* *********** OSKIT filesystem/ethernet START ***************** */
|
||||
# ifdef OSK_FILESYSTEMS_AND_ETHERNET
|
||||
|
||||
# include <oskit/c/fs.h>
|
||||
# include <oskit/dev/dev.h>
|
||||
# include <oskit/fs/filesystem.h>
|
||||
# include <oskit/fs/dir.h>
|
||||
# include <oskit/diskpart/diskpart.h>
|
||||
# include <oskit/fs/linux.h>
|
||||
# include <oskit/dev/linux.h>
|
||||
# include <oskit/principal.h>
|
||||
# include <oskit/net/freebsd.h>
|
||||
|
||||
static oskit_principal_t *cur_principal;
|
||||
static oskit_filesystem_t *main_fs;
|
||||
|
||||
static void unmount(void)
|
||||
{
|
||||
if (main_fs) {
|
||||
printf(">> Flushing and unmounting filesystem\n");
|
||||
fflush(NULL);
|
||||
oskit_clientos_setfsnamespace(NULL);
|
||||
oskit_filesystem_sync(main_fs, 1);
|
||||
oskit_filesystem_release(main_fs);
|
||||
main_fs = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int start_linux_fs(char *diskname, char *partname, int net)
|
||||
{
|
||||
oskit_error_t err;
|
||||
oskit_identity_t id;
|
||||
oskit_blkio_t *disk;
|
||||
oskit_blkio_t *part;
|
||||
oskit_filesystem_t *fs;
|
||||
oskit_dir_t *root;
|
||||
oskit_fsnamespace_t *fsnamespace;
|
||||
# define MAX_PARTS 30
|
||||
diskpart_t part_array[MAX_PARTS];
|
||||
int num_parts;
|
||||
|
||||
# define CHECK(what, f) \
|
||||
if ((err = f)) { printf("filesystem init error at " what ": %x\n", err); return 0; }
|
||||
|
||||
printf(">> Initializing devices\n");
|
||||
oskit_dev_init(osenv);
|
||||
oskit_linux_init_osenv(osenv);
|
||||
oskit_linux_init_ide();
|
||||
if (net)
|
||||
oskit_linux_init_net();
|
||||
oskit_linux_init_scsi();
|
||||
printf(">> Probing devices\n");
|
||||
oskit_dev_probe();
|
||||
printf(">> Filesystem initialization\n");
|
||||
CHECK("fsinit", fs_linux_init());
|
||||
|
||||
id.uid = 0;
|
||||
id.gid = 0;
|
||||
id.ngroups = 0;
|
||||
id.groups = 0;
|
||||
printf(">> Making principal\n");
|
||||
CHECK("makeprincipal", oskit_principal_create(&id, &cur_principal));
|
||||
|
||||
printf(">> Opening disk %s\n", diskname);
|
||||
CHECK("diskopen", oskit_linux_block_open(diskname, OSKIT_DEV_OPEN_ALL, &disk));
|
||||
|
||||
printf(">> Reading partitions\n");
|
||||
num_parts = diskpart_blkio_get_partition(disk, part_array, MAX_PARTS);
|
||||
printf(">> Found %d partitions, looking for %s\n", num_parts, partname);
|
||||
if (diskpart_blkio_lookup_bsd_string(part_array, partname, disk, &part) == 0) {
|
||||
printf("can't find partition %s\n", partname);
|
||||
return 0;
|
||||
}
|
||||
|
||||
oskit_blkio_release(disk); /* (Partition has a ref.) */
|
||||
|
||||
printf(">> Mounting filesystem\n");
|
||||
CHECK("mount", fs_linux_mount(part, 0, &fs));
|
||||
|
||||
printf(">> Getting root\n");
|
||||
CHECK("getroot", oskit_filesystem_getroot(fs, &root));
|
||||
CHECK("fsnamespace", oskit_create_fsnamespace(root, root, &fsnamespace));
|
||||
CHECK("setfsnamespace",oskit_clientos_setfsnamespace(fsnamespace));
|
||||
|
||||
/* fs has root: */
|
||||
oskit_dir_release(root);
|
||||
/* clientos has namespace: */
|
||||
oskit_fsnamespace_release(fsnamespace);
|
||||
|
||||
main_fs = fs;
|
||||
atexit(unmount);
|
||||
|
||||
return 1;
|
||||
# undef CHECK
|
||||
}
|
||||
|
||||
static int start_freebsd_enet(char *addr, char *mask, char *gate, int fs)
|
||||
{
|
||||
oskit_socket_factory_t *factory;
|
||||
struct oskit_freebsd_net_ether_if *eif;
|
||||
oskit_error_t err;
|
||||
# define CHECK(what, f) \
|
||||
if ((err = f)) { printf("ethernet init error at " what ": %x\n", err); return 0; }
|
||||
|
||||
if (!fs) {
|
||||
/* Otherwise, fs initialization does this: */
|
||||
printf(">> Initializing devices\n");
|
||||
oskit_dev_init(osenv);
|
||||
oskit_linux_init_osenv(osenv);
|
||||
oskit_linux_init_net();
|
||||
printf(">> Probing devices\n");
|
||||
oskit_dev_probe();
|
||||
}
|
||||
|
||||
printf(">> Initializing ethernet\n");
|
||||
CHECK("socket creator", oskit_freebsd_net_init(osenv, &factory));
|
||||
oskit_register(&oskit_socket_factory_iid, (void *)factory);
|
||||
|
||||
printf(">> Finding ethernet device\n");
|
||||
CHECK("open", oskit_freebsd_net_open_first_ether_if(&eif));
|
||||
|
||||
printf(">> Configuring ethernet: %s %s %s\n", addr, mask, gate);
|
||||
CHECK("ifconfig", oskit_freebsd_net_ifconfig(eif, "eth0", addr, mask));
|
||||
CHECK("gateway", oskit_freebsd_net_add_default_route(gate));
|
||||
|
||||
return 1;
|
||||
# undef CHECK
|
||||
}
|
||||
|
||||
oskit_error_t oskit_get_call_context(const struct oskit_guid *iid, void **out_if)
|
||||
{
|
||||
if (memcmp(iid, &oskit_iunknown_iid, sizeof(*iid)) == 0 ||
|
||||
memcmp(iid, &oskit_principal_iid, sizeof(*iid)) == 0) {
|
||||
*out_if = cur_principal;
|
||||
oskit_principal_addref(cur_principal);
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_if = 0;
|
||||
return OSKIT_E_NOINTERFACE;
|
||||
}
|
||||
|
||||
# endif
|
||||
/* *********** OSKIT filesystem/ethernet END ***************** */
|
||||
|
||||
#ifndef OSKIT_TEST
|
||||
|
||||
static void oskit_prepare(int *_argc, char ***_argv)
|
||||
{
|
||||
int argc = *_argc;
|
||||
char **argv = *_argv;
|
||||
|
||||
oskit_clientos_init();
|
||||
osenv = oskit_osenv_create_default();
|
||||
oskit_register(&oskit_osenv_iid, (void *)osenv);
|
||||
start_clock();
|
||||
oskit_init_libc();
|
||||
|
||||
# ifdef OSK_FILESYSTEMS_AND_ETHERNET
|
||||
{
|
||||
/* To hardwire a disk or network configuration, set
|
||||
`fs' or `net' to 1 and set the initial values of the
|
||||
corresponding configuration variables: */
|
||||
int fs = 0;
|
||||
char *disk = "hda";
|
||||
char *partition = "f";
|
||||
int net = 0;
|
||||
char *addr = "155.99.212.55";
|
||||
char *mask = "255.255.255.0";
|
||||
char *gate = "155.99.212.126";
|
||||
|
||||
while (1) {
|
||||
if (argc > 1) {
|
||||
if (!strcmp(argv[1], "--fs")) {
|
||||
if (argc >= 4) {
|
||||
fs = 1;
|
||||
disk = argv[2];
|
||||
partition = argv[3];
|
||||
memmove(argv + 1, argv + 4, (argc - 4) * sizeof(char **));
|
||||
argc -= 3;
|
||||
} else {
|
||||
argc = 1;
|
||||
printf("--fs requires two arguments: <disk> <partition>\n");
|
||||
break;
|
||||
}
|
||||
} else if (!strcmp(argv[1], "--net")) {
|
||||
if (argc >= 5) {
|
||||
net = 1;
|
||||
addr = argv[2];
|
||||
mask = argv[3];
|
||||
gate = argv[4];
|
||||
memmove(argv + 1, argv + 5, (argc - 5) * sizeof(char **));
|
||||
argc -= 4;
|
||||
} else {
|
||||
argc = 1;
|
||||
printf("--net requires three arguments: <address> <netmask> <gateway>\n");
|
||||
break;
|
||||
}
|
||||
} else
|
||||
break;
|
||||
} else
|
||||
break;
|
||||
}
|
||||
|
||||
if (fs) {
|
||||
if (!start_linux_fs(disk, partition, net)) {
|
||||
printf("Disk filesystem init failed; using in-memory filesystem.\n");
|
||||
start_memfs();
|
||||
}
|
||||
} else {
|
||||
printf("No disk or partition specified; using in-memory filesystem.\n");
|
||||
start_memfs();
|
||||
}
|
||||
|
||||
if (!net || !start_freebsd_enet(addr, mask, gate, fs))
|
||||
printf("No ethernet; TCP connections will fail.\n");
|
||||
}
|
||||
# else
|
||||
{
|
||||
start_memfs();
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef USE_OSKIT_CONSOLE
|
||||
/* We talk to console directly */
|
||||
direct_cons_set_flags(DC_NONBLOCK | DC_RAW);
|
||||
atexit(reset_console_input);
|
||||
# else
|
||||
/* C library handles console; needs liboskit_freebsd_dev.a. */
|
||||
/* (Initialization here conflicts with OSK_FILESYSTEMS_AND_ETHERNET). */
|
||||
oskit_dev_init();
|
||||
oskit_freebsd_init_sc();
|
||||
oskit_dev_probe();
|
||||
oskit_console_init();
|
||||
# endif
|
||||
|
||||
*_argc = argc;
|
||||
*_argv = argv;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* OSKIT */
|
|
@ -19,61 +19,6 @@
|
|||
/* (on Windows, this is done by a manual file which is in src/worksp) */
|
||||
#include "mzconfig.h"
|
||||
|
||||
/*************** OSKit with Linux/gcc *****************/
|
||||
|
||||
#if defined(OSKIT)
|
||||
|
||||
# define SYSTEM_TYPE_NAME "oskit"
|
||||
|
||||
# define DO_STACK_CHECK
|
||||
# ifndef OSKIT_TEST
|
||||
# define OSKIT_FIXED_STACK_BOUNDS
|
||||
# else
|
||||
# define ASSUME_FIXED_STACK_SIZE
|
||||
# define FIXED_STACK_SIZE 65500
|
||||
# endif
|
||||
# define STACK_SAFETY_MARGIN 10000
|
||||
|
||||
# define UNIX_FILE_SYSTEM
|
||||
# define NO_UNIX_USERS
|
||||
|
||||
# define DIR_FUNCTION
|
||||
# define DIRENT_NO_NAMLEN
|
||||
# define GETENV_FUNCTION
|
||||
|
||||
# ifndef OSKIT_TEST
|
||||
# define HAS_FREEBSD_IOB
|
||||
# else
|
||||
# define HAS_LINUX_IOB
|
||||
# endif
|
||||
# define USE_OSKIT_CONSOLE
|
||||
# define FILES_HAVE_FDS
|
||||
# define USE_FD_PORTS
|
||||
# define FIXED_FD_LIMIT 256
|
||||
# define USE_UNIX_SOCKETS_TCP
|
||||
# define USE_FCNTL_O_NONBLOCK
|
||||
|
||||
# ifndef OSKIT_TEST
|
||||
# define INCLUDE_OSKIT_SOCKET
|
||||
# define MZ_PF_INET OSKIT_PF_INET
|
||||
# define PROTOENT_IS_INT IPPROTO_TCP
|
||||
# endif
|
||||
|
||||
# define NO_USLEEP
|
||||
# define NO_SLEEP
|
||||
# define USER_TIME_IS_CLOCK
|
||||
|
||||
# define SIGSET_IS_SIGNAL
|
||||
|
||||
# define UNISTD_INCLUDE
|
||||
|
||||
# define USE_TM_GMTOFF_FIELD
|
||||
# define USE_TM_ZONE_FIELD
|
||||
|
||||
# define FLAGS_ALREADY_SET
|
||||
|
||||
#else /* >>>>>>> close after all platforms <<<<<<<<<< */
|
||||
|
||||
/************** SunOS/Solaris with gcc ****************/
|
||||
|
||||
#if defined(sun)
|
||||
|
@ -92,23 +37,10 @@
|
|||
# else
|
||||
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "sparc-solaris"
|
||||
# endif
|
||||
# define DIRENT_NO_NAMLEN
|
||||
# define NO_USLEEP
|
||||
# define USE_ULIMIT
|
||||
# define USE_FCNTL_O_NONBLOCK
|
||||
# define SOME_FDS_ARE_NOT_SELECTABLE
|
||||
# define NEED_RESET_STDOUT_BLOCKING
|
||||
# undef USE_FLOCK_FOR_FILE_LOCKS
|
||||
# define USE_FCNTL_AND_FORK_FOR_FILE_LOCKS
|
||||
# define USE_TIMEZONE_AND_ALTZONE_VAR
|
||||
# define USE_TZNAME_VAR
|
||||
# define USE_NULL_TO_DISCONNECT_UDP
|
||||
# else
|
||||
/* SunOS4 */
|
||||
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "sparc-sunos4"
|
||||
# define SIGSET_IS_SIGNAL
|
||||
# define USE_TM_GMTOFF_FIELD
|
||||
# define USE_TM_ZONE_FIELD
|
||||
# define NO_STRERROR_AVAILABLE
|
||||
# define USE_ON_EXIT_FOR_ATEXIT
|
||||
# endif
|
||||
|
@ -117,10 +49,6 @@
|
|||
|
||||
# define FMOD_CAN_RETURN_POS_ZERO
|
||||
|
||||
# ifdef _POSIX_PTHREAD_SEMANTICS
|
||||
# define SUBPROCESS_USE_FORK1
|
||||
# endif
|
||||
|
||||
# ifdef __i386__
|
||||
# define MZ_USE_JIT_I386
|
||||
# define MZ_JIT_USE_MPROTECT
|
||||
|
@ -142,17 +70,9 @@
|
|||
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "rs6k-aix"
|
||||
|
||||
# include "uconfig.h"
|
||||
# undef USE_FCHDIR
|
||||
|
||||
# define UNIX_LIMIT_STACK 33554944
|
||||
|
||||
# define SELECT_INCLUDE
|
||||
|
||||
# define USE_FCNTL_O_NONBLOCK
|
||||
|
||||
# define USE_TIMEZONE_VAR_W_DLS
|
||||
# define USE_TZNAME_VAR
|
||||
|
||||
# define FLAGS_ALREADY_SET
|
||||
|
||||
#endif
|
||||
|
@ -214,15 +134,10 @@
|
|||
# endif
|
||||
|
||||
# include "uconfig.h"
|
||||
# undef HAS_STANDARD_IOB
|
||||
# ifndef __ELF__
|
||||
# undef UNIX_DYNAMIC_LOAD
|
||||
# endif
|
||||
|
||||
# define DIRENT_NO_NAMLEN
|
||||
|
||||
# define HAS_LINUX_IOB
|
||||
|
||||
# define USE_IEEE_FP_PREDS
|
||||
# define USE_EXPLICT_FP_FORM_CHECK
|
||||
|
||||
|
@ -230,17 +145,6 @@
|
|||
# define SIGSET_NEEDS_REINSTALL
|
||||
|
||||
# define LINUX_FIND_STACK_BASE
|
||||
# define USE_DYNAMIC_FDSET_SIZE
|
||||
|
||||
# define USE_TIMEZONE_VAR_W_DLS
|
||||
# define USE_TZNAME_VAR
|
||||
|
||||
# define MZ_TCP_LISTEN_IPV6_ONLY_SOCKOPT
|
||||
|
||||
# ifdef __ANDROID__
|
||||
# define USE_FCNTL_O_NONBLOCK
|
||||
# define PROTOENT_IS_INT IPPROTO_TCP
|
||||
# endif
|
||||
|
||||
# define FLAGS_ALREADY_SET
|
||||
|
||||
|
@ -279,22 +183,14 @@
|
|||
|
||||
# include "uconfig.h"
|
||||
|
||||
# undef HAS_STANDARD_IOB
|
||||
# define HAS_BSD_IOB
|
||||
|
||||
#ifndef __ELF__
|
||||
# define UNDERSCORE_DYNLOAD_SYMBOL_PREFIX
|
||||
#endif
|
||||
|
||||
# define USE_IEEE_FP_PREDS
|
||||
|
||||
# define USE_DYNAMIC_FDSET_SIZE
|
||||
|
||||
# define SIGSET_IS_SIGNAL
|
||||
|
||||
# define USE_TM_GMTOFF_FIELD
|
||||
# define USE_TM_ZONE_FIELD
|
||||
|
||||
#if defined(__alpha__)
|
||||
# define USE_DIVIDE_MAKE_INFINITY
|
||||
#endif
|
||||
|
@ -344,8 +240,6 @@
|
|||
# endif
|
||||
|
||||
# include "uconfig.h"
|
||||
# undef HAS_STANDARD_IOB
|
||||
# define HAS_BSD_IOB
|
||||
# undef UNIX_FIND_STACK_BOUNDS
|
||||
# define PTHREAD_STACKSEG_FIND_STACK_BOUNDS
|
||||
|
||||
|
@ -359,13 +253,8 @@
|
|||
|
||||
# define USE_IEEE_FP_PREDS
|
||||
|
||||
# define USE_DYNAMIC_FDSET_SIZE
|
||||
|
||||
# define SIGSET_IS_SIGNAL
|
||||
|
||||
# define USE_TM_GMTOFF_FIELD
|
||||
# define USE_TM_ZONE_FIELD
|
||||
|
||||
# define USE_MAP_ANON
|
||||
|
||||
# if defined(__x86_64__)
|
||||
|
@ -408,8 +297,6 @@
|
|||
# endif
|
||||
|
||||
# include "uconfig.h"
|
||||
# undef HAS_STANDARD_IOB
|
||||
# define HAS_BSD_IOB
|
||||
# undef UNIX_FIND_STACK_BOUNDS
|
||||
# define PTHREAD_STACKSEG_FIND_STACK_BOUNDS
|
||||
|
||||
|
@ -423,13 +310,8 @@
|
|||
|
||||
# define USE_IEEE_FP_PREDS
|
||||
|
||||
# define USE_DYNAMIC_FDSET_SIZE
|
||||
|
||||
# define SIGSET_IS_SIGNAL
|
||||
|
||||
# define USE_TM_GMTOFF_FIELD
|
||||
# define USE_TM_ZONE_FIELD
|
||||
|
||||
# define USE_MAP_ANON
|
||||
|
||||
# if defined(__x86_64__)
|
||||
|
@ -485,9 +367,6 @@
|
|||
# define FIXED_STACK_SIZE 1048576
|
||||
|
||||
# include "uconfig.h"
|
||||
# undef HAS_STANDARD_IOB
|
||||
|
||||
# define HAS_BSD_IOB
|
||||
|
||||
# ifdef FREEBSD_VERSION_2x
|
||||
# define UNDERSCORE_DYNLOAD_SYMBOL_PREFIX
|
||||
|
@ -497,14 +376,8 @@
|
|||
|
||||
# define USE_IEEE_FP_PREDS
|
||||
|
||||
# define USE_DYNAMIC_FDSET_SIZE
|
||||
|
||||
# define SIGSET_IS_SIGNAL
|
||||
|
||||
# define USE_TM_GMTOFF_FIELD
|
||||
# define USE_TM_ZONE_FIELD
|
||||
# define MAX_VALID_DATE_SECONDS_BITS 51
|
||||
|
||||
# define MZ_JIT_USE_MPROTECT
|
||||
|
||||
# define FLAGS_ALREADY_SET
|
||||
|
@ -520,19 +393,11 @@
|
|||
|
||||
# include "uconfig.h"
|
||||
|
||||
# define DIRENT_NO_NAMLEN
|
||||
|
||||
# define BSTRING_INCLUDE
|
||||
|
||||
# define DEFEAT_FP_COMP_OPTIMIZATION
|
||||
# define FMOD_CAN_RETURN_NEG_ZERO
|
||||
|
||||
# define NO_USLEEP
|
||||
# define USE_FCNTL_O_NONBLOCK
|
||||
|
||||
# define USE_TIMEZONE_AND_ALTZONE_VAR
|
||||
# define USE_TZNAME_VAR
|
||||
|
||||
# define FLAGS_ALREADY_SET
|
||||
|
||||
#endif
|
||||
|
@ -545,12 +410,6 @@
|
|||
|
||||
# include "uconfig.h"
|
||||
# undef UNIX_DYNAMIC_LOAD
|
||||
# undef USE_FCHDIR
|
||||
|
||||
# define DIRENT_NO_NAMLEN
|
||||
|
||||
# define NO_USLEEP
|
||||
# define USE_FCNTL_O_NONBLOCK
|
||||
|
||||
# define FLAGS_ALREADY_SET
|
||||
|
||||
|
@ -582,22 +441,12 @@
|
|||
|
||||
# include "uconfig.h"
|
||||
|
||||
# define SOME_FDS_ARE_NOT_SELECTABLE
|
||||
# define USE_FCNTL_O_NONBLOCK
|
||||
|
||||
# define USE_SYSCALL_GETRUSAGE
|
||||
|
||||
# define USE_DIVIDE_MAKE_INFINITY
|
||||
# define USE_IEEE_FP_PREDS
|
||||
# define USE_EXPLICT_FP_FORM_CHECK
|
||||
# define ZERO_MINUS_ZERO_IS_POS_ZERO
|
||||
# define LOG_ZERO_ISNT_NEG_INF
|
||||
|
||||
# define USE_ULIMIT
|
||||
|
||||
# define USE_TIMEZONE_VAR_W_DLS
|
||||
# define USE_TZNAME_VAR
|
||||
|
||||
# define FLAGS_ALREADY_SET
|
||||
|
||||
#endif
|
||||
|
@ -610,18 +459,12 @@
|
|||
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "sco-i386"
|
||||
|
||||
# include "uconfig.h"
|
||||
# undef HAS_STANDARD_IOB
|
||||
#ifndef __ELF__
|
||||
# undef UNIX_DYNAMIC_LOAD
|
||||
#endif
|
||||
|
||||
# define DIRENT_NO_NAMLEN
|
||||
|
||||
# define HAS_SCO_IOB
|
||||
|
||||
# define USE_SCO_IEEE_FP_PREDS
|
||||
# define USE_EXPLICT_FP_FORM_CHECK
|
||||
# define USE_FCNTL_O_NONBLOCK
|
||||
|
||||
# define REGISTER_POOR_MACHINE
|
||||
|
||||
|
@ -644,20 +487,6 @@
|
|||
|
||||
# define SYSTEM_TYPE_NAME "windows"
|
||||
# define DOS_FILE_SYSTEM
|
||||
# if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
# define NO_READDIR
|
||||
# define USE_FINDFIRST
|
||||
# define MKDIR_NO_MODE_FLAG
|
||||
# endif
|
||||
# if defined(__BORLANDC__)
|
||||
# define DIRENT_NO_NAMLEN
|
||||
# define MKDIR_NO_MODE_FLAG
|
||||
# endif
|
||||
|
||||
# define USE_WIN32_TIME
|
||||
# define WINDOWS_GET_PROCESS_TIMES
|
||||
# define GETENV_FUNCTION
|
||||
# define DIR_FUNCTION
|
||||
|
||||
# define USE_WINDOWS_EVENT_LOG
|
||||
# define INIT_SYSLOG_LEVEL SCHEME_LOG_ERROR
|
||||
|
@ -698,8 +527,6 @@
|
|||
# define IO_INCLUDE
|
||||
# define DONT_IGNORE_PIPE_SIGNAL
|
||||
|
||||
# define PROCESS_FUNCTION
|
||||
# define NO_SLEEP
|
||||
# define WINDOWS_PROCESSES
|
||||
# define WINDOWS_FILE_HANDLES
|
||||
# ifndef MZ_USE_DETERMINSTIC_FUEL
|
||||
|
@ -710,8 +537,6 @@
|
|||
# define SIGSET_NEEDS_REINSTALL
|
||||
# define NO_SIGHUP_HANDLER
|
||||
|
||||
#define USE_WINSOCK_TCP
|
||||
|
||||
#define PRINTF_INTPTR_SIZE_PREFIX "I"
|
||||
|
||||
/* MS Visual C++ likes underscore prefixes */
|
||||
|
@ -776,29 +601,14 @@
|
|||
|
||||
# undef USE_ITIMER
|
||||
|
||||
# undef HAS_STANDARD_IOB
|
||||
# define HAS_CYGWIN_IOB
|
||||
# define MZ_BINARY O_BINARY
|
||||
|
||||
# define DIRENT_NO_NAMLEN
|
||||
# define UNISTD_INCLUDE
|
||||
|
||||
# define SIGCHILD_DOESNT_INTERRUPT_SELECT
|
||||
# define SIGSET_IS_SIGNAL
|
||||
# define SIGSET_NEEDS_REINSTALL
|
||||
|
||||
# define CANT_SET_SOCKET_BUFSIZE
|
||||
# define NO_NEED_FOR_BEGINTHREAD
|
||||
# define USE_CREATE_PIPE
|
||||
|
||||
# define USE_MZ_CYGWIN_SETJMP
|
||||
# define USE_MZ_SETJMP
|
||||
|
||||
# define USE_CYGWIN_SO_SUFFIX
|
||||
|
||||
# define USE_PLAIN_TIME
|
||||
# define USE_TOD_FOR_TIMEZONE
|
||||
|
||||
# define USE_DIVIDE_MAKE_INFINITY
|
||||
|
||||
# define DO_STACK_CHECK
|
||||
|
@ -840,9 +650,6 @@
|
|||
|
||||
# define INIT_SYSLOG_LEVEL SCHEME_LOG_ERROR
|
||||
|
||||
# undef HAS_STANDARD_IOB
|
||||
# define HAS_BSD_IOB
|
||||
|
||||
#ifndef XONX
|
||||
# undef SYSTEM_TYPE_NAME
|
||||
# define SYSTEM_TYPE_NAME "macosx"
|
||||
|
@ -858,19 +665,10 @@
|
|||
# define USE_IEEE_FP_PREDS
|
||||
# define TRIG_ZERO_NEEDS_SIGN_CHECK
|
||||
|
||||
# define USE_DYNAMIC_FDSET_SIZE
|
||||
|
||||
# define SIGSET_IS_SIGNAL
|
||||
|
||||
# define MZ_TCP_LISTEN_IPV6_ONLY_SOCKOPT
|
||||
|
||||
# define USE_TM_GMTOFF_FIELD
|
||||
# define USE_TM_ZONE_FIELD
|
||||
|
||||
# define USE_UNDERSCORE_SETJMP
|
||||
|
||||
# define UDP_DISCONNECT_EADRNOTAVAIL_OK
|
||||
|
||||
#ifndef XONX
|
||||
# define MACOS_UNICODE_SUPPORT
|
||||
#endif
|
||||
|
@ -912,17 +710,10 @@
|
|||
|
||||
# define USE_MAP_ANON
|
||||
|
||||
# define USE_DYNAMIC_FDSET_SIZE
|
||||
|
||||
# define SIGSET_IS_SIGNAL
|
||||
|
||||
# define USE_TM_GMTOFF_FIELD
|
||||
# define USE_TM_ZONE_FIELD
|
||||
|
||||
# define USE_UNDERSCORE_SETJMP
|
||||
|
||||
# define UDP_DISCONNECT_EADRNOTAVAIL_OK
|
||||
|
||||
# define MZ_USE_JIT_I386
|
||||
|
||||
# define FLAGS_ALREADY_SET
|
||||
|
@ -942,16 +733,10 @@
|
|||
# define SIGSET_IS_SIGNAL
|
||||
# define SIGSET_NEEDS_REINSTALL
|
||||
|
||||
# define USE_FCNTL_O_NONBLOCK
|
||||
|
||||
# define FIXED_STACK_SIZE 524288
|
||||
|
||||
# define FLAGS_ALREADY_SET
|
||||
|
||||
# define USE_DYNAMIC_FDSET_SIZE
|
||||
|
||||
# define BROKEN_READLINK_NUL_TERMINATOR
|
||||
|
||||
#if defined(__i386__)
|
||||
# define MZ_USE_JIT_I386
|
||||
# define MZ_JIT_USE_MPROTECT
|
||||
|
@ -990,9 +775,6 @@
|
|||
# define FIXED_STACK_SIZE 1048576
|
||||
|
||||
# include "uconfig.h"
|
||||
# undef HAS_STANDARD_IOB
|
||||
|
||||
# define HAS_BSD_IOB
|
||||
|
||||
# define USE_UNDERSCORE_SETJMP
|
||||
|
||||
|
@ -1001,24 +783,14 @@
|
|||
# define POW_HANDLES_INF_CORRECTLY
|
||||
# endif
|
||||
|
||||
# define USE_DYNAMIC_FDSET_SIZE
|
||||
|
||||
# define SIGSET_IS_SIGNAL
|
||||
|
||||
# define USE_TM_GMTOFF_FIELD
|
||||
# define USE_TM_ZONE_FIELD
|
||||
# define MAX_VALID_DATE_SECONDS_BITS 51
|
||||
|
||||
# define MZ_JIT_USE_MPROTECT
|
||||
|
||||
# define FLAGS_ALREADY_SET
|
||||
|
||||
#endif
|
||||
|
||||
/***************************************************/
|
||||
|
||||
#endif /* end not OSKit */
|
||||
|
||||
/************** (END KNOWN ARCHITECTURE/SYSTEMS) ****************/
|
||||
|
||||
|
||||
|
@ -1043,49 +815,6 @@
|
|||
"schsys.h" into the same directory as .o files and #included
|
||||
by string.c. This string is returned by (system-library-subpath) */
|
||||
|
||||
/*********************/
|
||||
/* Language Features */
|
||||
/*********************/
|
||||
|
||||
/* CLOCKS_PER_SEC relates the values returned by clock() to
|
||||
real seconds. (The difference between two clock() calls is
|
||||
divided by this number.) Usually, this is defined in <time.h>;
|
||||
it defaults to 1000000 */
|
||||
|
||||
/* USE_PLAIN_TIME uses time. */
|
||||
|
||||
/* USE_WIN32_TIME uses the Win32 API to implement time functions. */
|
||||
|
||||
/* CLOCK_IS_USER_TIME uses the system time for user milliseconds. */
|
||||
|
||||
/* USER_TIME_IS_CLOCK uses the user time for system milliseconds. */
|
||||
|
||||
/* TIME_TYPE_IS_UNSIGNED converts time_t values as unsigned. */
|
||||
|
||||
/* MAX_VALID_DATE_SECONDS_BITS sets a maximum number of bits for
|
||||
seconds to pass to localtime() ro gmtime(). */
|
||||
|
||||
/* MIN_VALID_DATE_SECONDS sets a minimum vald time in seconds. */
|
||||
|
||||
/* PROCESS_FUNCTION adds (process ...) and (system ...) functions */
|
||||
|
||||
/* DIR_FUNCTION adds (current-directory ...) function */
|
||||
|
||||
/* GETENV_FUNCTION adds (getenv ...) function */
|
||||
|
||||
/* USE_TIMEZONE_VAR gets timezone offset from a timezone global.
|
||||
USE_TOD_FOR_TIMEZONE gets timezone offset via gettimeofday.
|
||||
USE_TIMEZONE_VAR_W_DLS is similar, but adds 1 hour when daylight
|
||||
savings is in effect.
|
||||
USE_TIMEZONE_AND_ALTZONE_VAR is similar, but uses altzone when
|
||||
daylight savings is in effect.
|
||||
USE_TM_GMTOFF_FIELD gets timezone offset from the tm_gmtoff field
|
||||
of the tm struct. */
|
||||
|
||||
/* USE_TZNAME_VAR gets the timezone name from a tzname global.
|
||||
USE_TM_ZONE_FIELD gets the timezone name from a tm_zone field
|
||||
of the tm struct. */
|
||||
|
||||
/*******************/
|
||||
/* Filesystem */
|
||||
/*******************/
|
||||
|
@ -1099,34 +828,6 @@
|
|||
"X:\", "X:/", "\", or "/" as a root directory (for some letter X),
|
||||
and case insensitivity */
|
||||
|
||||
/* MAC_FILE_SYSTEM indicates that filenames are as on the Macintosh,
|
||||
with colon separators, "" as the parent directory, a volume name
|
||||
(followed by a colon) as a root directory, and case insensitivity. */
|
||||
|
||||
/* EXPAND_FILENAME_TILDE expands ~ in a filename with a user's home
|
||||
directory. */
|
||||
|
||||
/* NO_STAT_PROC means that there is no stat() function. */
|
||||
|
||||
/* NO_MKDIR means that there is no mkdir() function. */
|
||||
|
||||
/* BROKEN_READLINK_NUL_TERMINATOR means that readlink() may
|
||||
report a length that includes trailing NUL terminators,
|
||||
which should be stripped away. */
|
||||
|
||||
/* USE_GETDISK uses getdisk() and setdisk() to implement the
|
||||
filesystem-root-list primitive under DOS. */
|
||||
|
||||
/* NO_READDIR means that there is no opendir() and readdir() for
|
||||
implementing directory-list. */
|
||||
|
||||
/* DIRENT_NO_NAMLEN specifies that dirent entries do not have a
|
||||
d_namlen field; this is used only when NO_READDIR is not
|
||||
specified. */
|
||||
|
||||
/* MKDIR_NO_MODE_FLAG specifies that mkdir() takes only one argument,
|
||||
instead of a directory name and mode flags. */
|
||||
|
||||
/* USE_C_SYSLOG uses the C syslog library for logging. */
|
||||
|
||||
/* USE_WINDOWS_EVENT_LOG uses the Windows event log API for logging. */
|
||||
|
@ -1134,6 +835,10 @@
|
|||
/* INIT_SYSLOG_LEVEL sets the initial level for filtering messages
|
||||
sent to syslog. It default to 0 (i.e., no events). */
|
||||
|
||||
/* USE_TRANSITIONAL_64_FILE_OPS uses lseek64, stat64, etc. for file
|
||||
operations involving sizes (that can require 64-bit
|
||||
arithmetic). */
|
||||
|
||||
/***********************/
|
||||
/* Ports */
|
||||
/***********************/
|
||||
|
@ -1142,101 +847,16 @@
|
|||
None of these flags are required, but char-ready? may return
|
||||
spurious #ts if they are set up incorrectly. */
|
||||
|
||||
/* HAS_STANDARD_IOB, HAS_GNU_IOB, HAS_CYGWIN_IOB, HAS_LINUX_IOB,
|
||||
HAS_BSD_IOB, and HAS_SCO_IOB are mutually exclusive; they describe
|
||||
how to read the FILE* structure to determine if there are
|
||||
available cached characters. */
|
||||
|
||||
/* USE_FD_PORTS uses Unix-style open(), etc., for file ports. */
|
||||
|
||||
/* FILES_HAVE_FDS means that a FILE* is always associated with a
|
||||
file desciptor, which can be select-ed to see if there are
|
||||
pending bytes. Don't use this unless one of the HAS_<X>_IOB
|
||||
flags is used. */
|
||||
|
||||
/* USE_FLOCK_FOR_FILE_LOCKS means that flock() is available and works
|
||||
for file locking. */
|
||||
|
||||
/* USE_FCNTL_AND_FORK_FOR_FILE_LOCKS means that fnctl() and fork()
|
||||
should be used to implement file locking. */
|
||||
|
||||
/* CLOSE_ALL_FDS_AFTER_FORK means that all fds except 0, 1, and 2
|
||||
should be closed after performing a fork() for `process'
|
||||
and `system' calls. */
|
||||
|
||||
/* SUBPROCESS_USE_FORK1 uses fork1() instead of fork(). */
|
||||
|
||||
/* USE_UNIX_SOCKETS_TCP means that the tcp- procedures can be implemented
|
||||
with the standard Unix socket functions. */
|
||||
|
||||
/* USE_WINSOCK_TCP means that the tcp- procedures can be implemented
|
||||
with the Winsock toolbox. */
|
||||
|
||||
/* USE_MAC_TCP means that the tcp- procedures can be implemented
|
||||
with the Mac TCP toolbox. */
|
||||
|
||||
/* WINDOWS_FILE_HANDLES implements file access through the Windows
|
||||
API (CreateFile(), ReadFile(), etc.) */
|
||||
|
||||
/* USE_FCNTL_O_NONBLOCK uses O_NONBLOCK instead of FNDELAY for
|
||||
fcntl on Unix TCP sockets. (Posix systems need this flag). */
|
||||
|
||||
/* SOME_FDS_ARE_NOT_SELECTABLE indicates that select() doesn't work
|
||||
for reading on all kinds of file descriptors. Such FDs must never
|
||||
be able to go from no-char-ready to char-ready while Racket is
|
||||
sleeping. */
|
||||
|
||||
/* NEED_RESET_STDOUT_BLOCKING enures that file descriptors 1 and 2
|
||||
are reset to blocking mode before exiting. */
|
||||
|
||||
/* USE_TRANSITIONAL_64_FILE_OPS uses fseeko64, lseek64, stat64,
|
||||
etc. for file operations involving sizes (that can require
|
||||
64-bit arithmetic). */
|
||||
|
||||
/* USE_ULIMIT uses ulimit instead of getdtablesize (Unix). */
|
||||
|
||||
/* USE_DYNAMIC_FDSET_SIZE allocates fd_set records based on the
|
||||
current fd limit instead of relying on the compile-time size
|
||||
of fd_set. */
|
||||
|
||||
/* UNIX_LIMIT_FDSET_SIZE insures that the fd limit at start-up is
|
||||
no greater than FD_SETSIZE */
|
||||
|
||||
/* CANT_SET_SOCKET_BUFSIZE turns off setting the buffer size for
|
||||
Unix TCP sockets. */
|
||||
|
||||
/* USE_NULL_TO_DISCONNECT_UDP calls connect() with NULL instead of
|
||||
an AF_UNSPEC address to disconnect a UDP socket. */
|
||||
|
||||
/* UDP_DISCONNECT_EADRNOTAVAIL_OK means that a disconnecting call
|
||||
to connect() might return EADDRNOTAVAIL instead of
|
||||
EAFNOSUPPORT. */
|
||||
|
||||
/* MZ_BINARY is combined with other flags in all calls to open();
|
||||
it can be defined to O_BINARY in Cygwin, for example. */
|
||||
|
||||
/* MZ_TCP_LISTEN_IPV6_ONLY_SOCKOPT uses IPV6_V6ONLY for IPv6
|
||||
listeners when the same listener has an IPv4 address, which means
|
||||
that the IpV6 listener accepts only IPv6 connections. This is used
|
||||
with Linux, for example, because a port cannot have both an IPv4
|
||||
and IPv6 listener if the IPv6 one doesn't use IPV6_V6ONLY. (The
|
||||
two listeners might be for different interfaces, in which case
|
||||
IPV6_V6ONLY is not necessary, but we must err on the side of being
|
||||
too restrictive. If IPV6_V6ONLY is not #defined or if setting the
|
||||
option doesn't work, then the IPv6 addresses are silently ignored
|
||||
when creating the listener (but only where there is at least once
|
||||
IPv4 address). */
|
||||
|
||||
/***********************/
|
||||
/* Threads & Signals */
|
||||
/***********************/
|
||||
|
||||
/* These are flags about the implementation of system, process, etc. */
|
||||
|
||||
/* UNIX_PROCESSES implements the process functions for Unix; uses
|
||||
sigset() to install the signal handler. */
|
||||
|
||||
/* WINDOWS_PROCESSES implements the process functions for Windows. */
|
||||
/* WINDOWS_PROCESSES uses Windows threads for various tasks. */
|
||||
|
||||
/* USE_ITIMER uses setitimer() to implement thread pre-emption (for
|
||||
Racket-implemented threads). Define MZ_THREAD_QUANTUM_USEC to
|
||||
|
@ -1263,12 +883,6 @@
|
|||
/* DONT_IGNORE_PIPE_SIGNAL stops Racket from ignoring SIGPIPE
|
||||
signals. */
|
||||
|
||||
/* USE_CREATE_PIPE uses CreatePipe() instead of _pipe() for Windows. */
|
||||
|
||||
/* SIGCHILD_DOESNT_INTERRUPT_SELECT indicates that the SIGCHILD
|
||||
signal, sent when a child OS process dies, does not interrupt
|
||||
select(). This flag is needed for Cygwin B20. */
|
||||
|
||||
/* USE_UNDERSCORE_SETJMP uses _setjmp() instead of setjmp() to avoid
|
||||
sigmal-mask work. */
|
||||
|
||||
|
@ -1418,7 +1032,7 @@
|
|||
/* SIN_COS_NEED_DEOPTIMIZE disables optimization for calls to sin()
|
||||
and cos() (for MSVC) */
|
||||
|
||||
/******************************/
|
||||
/****************************/
|
||||
/* Byte Order and long long */
|
||||
/****************************/
|
||||
|
||||
|
@ -1465,9 +1079,6 @@
|
|||
be necessary to avoid GC-setup traversal over too much memory
|
||||
(with GC flag HEURISTIC2?). */
|
||||
|
||||
/* OSKIT_FIXED_STACK_BOUNDS uses base_stack_start to get the hottest
|
||||
stack location */
|
||||
|
||||
/***********************/
|
||||
/* Dynamic Loading */
|
||||
/***********************/
|
||||
|
@ -1515,39 +1126,13 @@
|
|||
/* MZ_JIT_USE_WINDOWS_VIRTUAL_ALLOC uses VirtualAlloc to make
|
||||
code pages executable. */
|
||||
|
||||
/***********************/
|
||||
/* Heap Images */
|
||||
/***********************/
|
||||
|
||||
/* UNIX_IMAGE_DUMPS turns on image save and restore for Unix systems.
|
||||
This will only work if the final application is statically linked.
|
||||
(As an exception, the dynamic-linking library itself can be
|
||||
dynamically linked. This works because loading an extension in
|
||||
Racket automatically turns off image saving.) */
|
||||
|
||||
/*****************************/
|
||||
/* Macintosh Standalone */
|
||||
/* MacOS */
|
||||
/*****************************/
|
||||
|
||||
/* MACINTOSH_EVENTS enables specific support for Mac Classic */
|
||||
|
||||
/* MAC_MZ_GUI_ENABLED activates the windowed I/O code (use under classic)
|
||||
(should maybe use MACINTOSH_SIOUX instead?) */
|
||||
|
||||
/* MAC_CLASSIC_PROCESS_CONTROL swaps the UNIX process commands for the
|
||||
mac family (use under classic) */
|
||||
|
||||
/* OS_X enables specific support for Mac OS X, e.g. the location of the
|
||||
/* OS_X enables specific support for Mac OS, e.g. the location of the
|
||||
prefs directory */
|
||||
|
||||
/* MACINTOSH_GIVE_TIME lets background processes run when checking for
|
||||
a user break */
|
||||
|
||||
/* MACINTOSH_SIOUX interfaces with Metrowerks's SIOUX library */
|
||||
|
||||
/* MACINTOSH_SET_STACK sets the stack to be 1/4 of the heap; this should
|
||||
be used for 68k machines, where the stack is not user-configurable */
|
||||
|
||||
/***********************/
|
||||
/* Miscellaneous */
|
||||
/***********************/
|
||||
|
@ -1587,51 +1172,11 @@
|
|||
|
||||
/* NO_SIGHUP_HANDLER turns off handling of SIGHUP in main.c */
|
||||
|
||||
/* DIR_INCLUDE if there's a <dir.h> file (mainly for Windows). */
|
||||
|
||||
/* DIRECT_INCLUDE if there's a <direct.h> file (mainly for Windows). */
|
||||
|
||||
/* IO_INCLUDE if there's a <io.h> file (mainly for Windows). */
|
||||
|
||||
/* UNISTD_INCLUDE if there's a <unistd.h> file (mainly for Unix). */
|
||||
|
||||
/* SELECT_INCLUDE if there's a <sys/select.h> file (mainly for Unix)
|
||||
to be used with FILES_HAVE_FDS. */
|
||||
|
||||
/* BSTRING_INCLUDE if there's a <bstring.h> file (mainly for Unix)
|
||||
to be used with FILES_HAVE_FDS. */
|
||||
|
||||
/* NO_SYS_INCLUDE_SUBDIR if include files should all be <XXX.h>; no
|
||||
includes of the form <sys/XXX.h>. Mainly used for <sys/stat.h>
|
||||
for MacOS. */
|
||||
|
||||
/* USE_FCHDIR uses fchdir() to improve thread context switches when
|
||||
a small number of threads are active. */
|
||||
|
||||
/* USE_GETRUSAGE uses getrusage() to for timing info; otherwise clock()
|
||||
is used. */
|
||||
|
||||
/* USE_SYSCALL_GETRUSAGE uses syscall() to implement getrusage() for
|
||||
timing info. Used with USE_GETRUSAGE. */
|
||||
|
||||
/* NO_SLEEP means that there is no sleep() function. Used only in
|
||||
standalone Racket. */
|
||||
|
||||
/* NO_USLEEP means that there is no usleep() function. Used only in
|
||||
standalone Racket. Used only if NO_SLEEP is undefined. */
|
||||
|
||||
/* NO_STRERROR_AVAILABLE means that strerror() is not available. */
|
||||
|
||||
/* USE_ON_EXIT_FOR_ATEXIT means that a SunOS4-style on_exit()
|
||||
is available instead of atexit(). */
|
||||
|
||||
/* NO_NEED_FOR_BEGINTHREAD indicates that the C library used for
|
||||
Windows is always thread-ready and there's no need use the
|
||||
_beginthreadex() function instead of CreateThread(). */
|
||||
|
||||
/* WIN32S_HACK uses a special hack to implement threads under Win32s
|
||||
with some compilers. Obsolete. */
|
||||
|
||||
/* FFI_CALLBACK_NEED_INT_CLEAR indiates thet libffi callback results
|
||||
that are smaller than an `int' should clear `int'-sized space
|
||||
in the result area. */
|
||||
|
|
|
@ -178,15 +178,6 @@ void os_platform_init() {
|
|||
setrlimit(RLIMIT_STACK, &rl);
|
||||
}
|
||||
#endif
|
||||
#ifdef UNIX_LIMIT_FDSET_SIZE
|
||||
struct rlimit rl;
|
||||
|
||||
getrlimit(RLIMIT_NOFILE, &rl);
|
||||
if (rl.rlim_cur > FD_SETSIZE) {
|
||||
rl.rlim_cur = FD_SETSIZE;
|
||||
setrlimit(RLIMIT_NOFILE, &rl);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Scheme_Env *scheme_restart_instance() {
|
||||
|
@ -570,9 +561,7 @@ static Scheme_Env *place_instance_init(void *stack_base, int initial_main_os_thr
|
|||
|
||||
/* BEGIN PRIMITIVE MODULES */
|
||||
scheme_init_linklet(env);
|
||||
#ifndef NO_TCP_SUPPORT
|
||||
scheme_init_network(env);
|
||||
#endif
|
||||
scheme_init_paramz(env);
|
||||
scheme_init_expand_observe(env);
|
||||
scheme_init_place(env);
|
||||
|
|
|
@ -162,12 +162,6 @@
|
|||
#ifdef WINDOWS_FIND_STACK_BOUNDS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#ifdef BEOS_FIND_STACK_BOUNDS
|
||||
# include <be/kernel/OS.h>
|
||||
#endif
|
||||
#ifdef OSKIT_FIXED_STACK_BOUNDS
|
||||
# include <oskit/machine/base_stack.h>
|
||||
#endif
|
||||
#include "schmach.h"
|
||||
#ifdef MACOS_STACK_LIMIT
|
||||
#include <Memory.h>
|
||||
|
@ -701,18 +695,6 @@ void scheme_init_stack_check()
|
|||
}
|
||||
# endif
|
||||
|
||||
# ifdef BEOS_FIND_STACK_BOUNDS
|
||||
{
|
||||
thread_info info;
|
||||
get_thread_info(find_thread(NULL), &info);
|
||||
scheme_stack_boundary = (uintptr_t)info.stack_base + STACK_SAFETY_MARGIN;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef OSKIT_FIXED_STACK_BOUNDS
|
||||
scheme_stack_boundary = (uintptr_t)base_stack_start + STACK_SAFETY_MARGIN;
|
||||
# endif
|
||||
|
||||
# ifdef UNIX_FIND_STACK_BOUNDS
|
||||
{
|
||||
struct rlimit rl;
|
||||
|
|
|
@ -103,7 +103,6 @@ static Scheme_Object *file_exists(int argc, Scheme_Object **argv);
|
|||
static Scheme_Object *directory_exists(int argc, Scheme_Object **argv);
|
||||
static Scheme_Object *link_exists(int argc, Scheme_Object **argv);
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
static Scheme_Object *build_path_kind(int argc, Scheme_Object **argv);
|
||||
static Scheme_Object *delete_file(int argc, Scheme_Object **argv);
|
||||
static Scheme_Object *rename_file(int argc, Scheme_Object **argv);
|
||||
|
@ -136,12 +135,9 @@ static Scheme_Object *use_user_paths(int, Scheme_Object *[]);
|
|||
static Scheme_Object *use_link_paths(int, Scheme_Object *[]);
|
||||
static Scheme_Object *use_compiled_file_check(int, Scheme_Object *[]);
|
||||
static Scheme_Object *find_system_path(int argc, Scheme_Object **argv);
|
||||
#endif
|
||||
|
||||
#ifdef DIR_FUNCTION
|
||||
static Scheme_Object *current_directory(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *current_user_directory(int argc, Scheme_Object *argv[]);
|
||||
#endif
|
||||
static Scheme_Object *current_force_delete_perms(int argc, Scheme_Object *argv[]);
|
||||
|
||||
static int has_null(const char *s, intptr_t l);
|
||||
|
@ -157,7 +153,6 @@ static Scheme_Object *do_path_to_directory_path(char *s, intptr_t offset, intptr
|
|||
READ_ONLY static Scheme_Object *up_symbol;
|
||||
READ_ONLY static Scheme_Object *relative_symbol;
|
||||
READ_ONLY static Scheme_Object *same_symbol;
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
READ_ONLY static Scheme_Object *read_symbol, *write_symbol, *execute_symbol;
|
||||
|
||||
READ_ONLY static Scheme_Object *temp_dir_symbol, *home_dir_symbol, *pref_dir_symbol;
|
||||
|
@ -175,7 +170,6 @@ SHARED_OK static Scheme_Object *host_collects_path, *host_config_path;
|
|||
THREAD_LOCAL_DECL(static Scheme_Object *original_pwd);
|
||||
SHARED_OK static Scheme_Object *addon_dir;
|
||||
|
||||
#endif
|
||||
READ_ONLY static Scheme_Object *windows_symbol, *unix_symbol;
|
||||
|
||||
void scheme_init_file(Scheme_Env *env)
|
||||
|
@ -185,7 +179,6 @@ void scheme_init_file(Scheme_Env *env)
|
|||
REGISTER_SO(up_symbol);
|
||||
REGISTER_SO(relative_symbol);
|
||||
REGISTER_SO(same_symbol);
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
REGISTER_SO(read_symbol);
|
||||
REGISTER_SO(write_symbol);
|
||||
REGISTER_SO(execute_symbol);
|
||||
|
@ -207,7 +200,7 @@ void scheme_init_file(Scheme_Env *env)
|
|||
REGISTER_SO(host_config_dir_symbol);
|
||||
REGISTER_SO(orig_dir_symbol);
|
||||
REGISTER_SO(addon_dir_symbol);
|
||||
#endif
|
||||
|
||||
REGISTER_SO(windows_symbol);
|
||||
REGISTER_SO(unix_symbol);
|
||||
|
||||
|
@ -215,7 +208,6 @@ void scheme_init_file(Scheme_Env *env)
|
|||
relative_symbol = scheme_intern_symbol("relative");
|
||||
same_symbol = scheme_intern_symbol("same");
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
read_symbol = scheme_intern_symbol("read");
|
||||
write_symbol = scheme_intern_symbol("write");
|
||||
execute_symbol = scheme_intern_symbol("execute");
|
||||
|
@ -237,7 +229,6 @@ void scheme_init_file(Scheme_Env *env)
|
|||
host_config_dir_symbol = scheme_intern_symbol("host-config-dir");
|
||||
orig_dir_symbol = scheme_intern_symbol("orig-dir");
|
||||
addon_dir_symbol = scheme_intern_symbol("addon-dir");
|
||||
#endif
|
||||
|
||||
windows_symbol = scheme_intern_symbol("windows");
|
||||
unix_symbol = scheme_intern_symbol("unix");
|
||||
|
@ -318,7 +309,6 @@ void scheme_init_file(Scheme_Env *env)
|
|||
"link-exists?",
|
||||
1, 1),
|
||||
env);
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
scheme_add_global_constant("delete-file",
|
||||
scheme_make_prim_w_arity(delete_file,
|
||||
"delete-file",
|
||||
|
@ -458,9 +448,6 @@ void scheme_init_file(Scheme_Env *env)
|
|||
1, 1),
|
||||
env);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef DIR_FUNCTION
|
||||
scheme_add_global_constant("current-directory",
|
||||
scheme_register_parameter(current_directory,
|
||||
"current-directory",
|
||||
|
@ -471,14 +458,12 @@ void scheme_init_file(Scheme_Env *env)
|
|||
"current-directory-for-user",
|
||||
MZCONFIG_CURRENT_USER_DIRECTORY),
|
||||
env);
|
||||
#endif
|
||||
scheme_add_global_constant("current-force-delete-permissions",
|
||||
scheme_register_parameter(current_force_delete_perms,
|
||||
"current-force-delete-permissions",
|
||||
MZCONFIG_FORCE_DELETE_PERMS),
|
||||
env);
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
scheme_add_global_constant("current-library-collection-paths",
|
||||
scheme_register_parameter(current_library_collection_paths,
|
||||
"current-library-collection-paths",
|
||||
|
@ -489,7 +474,6 @@ void scheme_init_file(Scheme_Env *env)
|
|||
"current-library-collection-links",
|
||||
MZCONFIG_COLLECTION_LINKS),
|
||||
env);
|
||||
#endif
|
||||
scheme_add_global_constant("use-compiled-file-paths",
|
||||
scheme_register_parameter(use_compiled_kind,
|
||||
"use-compiled-file-paths",
|
||||
|
@ -519,9 +503,7 @@ void scheme_init_file(Scheme_Env *env)
|
|||
|
||||
void scheme_init_file_places()
|
||||
{
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
REGISTER_SO(original_pwd);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
|
@ -3089,7 +3071,6 @@ Scheme_Object *scheme_split_path(const char *path, int len, Scheme_Object **base
|
|||
return do_split_path_once(path, len, base_out, id_out, NULL, kind);
|
||||
}
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
static Scheme_Object *_split_path(const char *who, int argc, Scheme_Object **argv, int multi)
|
||||
{
|
||||
char *s;
|
||||
|
@ -3152,7 +3133,6 @@ static Scheme_Object *explode_path(int argc, Scheme_Object **argv)
|
|||
{
|
||||
return _split_path("explode-path", argc, argv, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
int scheme_is_relative_path(const char *s, intptr_t len, int kind)
|
||||
{
|
||||
|
@ -3353,8 +3333,6 @@ Scheme_Object *scheme_path_to_complete_path(Scheme_Object *path, Scheme_Object *
|
|||
return path_to_complete_path(relto_path ? 2 : 1, a);
|
||||
}
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
|
||||
static char *filename_for_error(Scheme_Object *p)
|
||||
{
|
||||
return do_expand_filename(p, NULL, 0,
|
||||
|
@ -3365,7 +3343,6 @@ static char *filename_for_error(Scheme_Object *p)
|
|||
0);
|
||||
}
|
||||
|
||||
|
||||
static int can_enable_write_permission()
|
||||
{
|
||||
#ifdef DOS_FILE_SYSTEM
|
||||
|
@ -4964,10 +4941,6 @@ static Scheme_Object *file_size(int argc, Scheme_Object *argv[])
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef DIR_FUNCTION
|
||||
|
||||
static Scheme_Object *cwd_check(int argc, Scheme_Object **argv)
|
||||
{
|
||||
if (!SCHEME_PATH_STRINGP(argv[0])) {
|
||||
|
@ -4979,9 +4952,7 @@ static Scheme_Object *cwd_check(int argc, Scheme_Object **argv)
|
|||
expanded = scheme_expand_string_filename(argv[0], "current-directory", NULL, SCHEME_GUARD_FILE_EXISTS);
|
||||
ed = scheme_make_sized_path(expanded, strlen(expanded), 1);
|
||||
|
||||
# ifndef NO_FILE_SYSTEM_UTILS
|
||||
ed = do_simplify_path(ed, scheme_null, 0, 1, 0, SCHEME_PLATFORM_PATH_KIND, 1);
|
||||
# endif
|
||||
|
||||
ed = scheme_path_to_directory_path(ed);
|
||||
|
||||
|
@ -5013,8 +4984,6 @@ static Scheme_Object *current_user_directory(int argc, Scheme_Object **argv)
|
|||
"path-string?", 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static Scheme_Object *current_force_delete_perms(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
return scheme_param_config("current-force-delete-permissions",
|
||||
|
@ -5148,8 +5117,6 @@ static Scheme_Object *collpaths_gen_p(int argc, Scheme_Object **argv, int rel_ok
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
|
||||
static Scheme_Object *collpaths_p(int argc, Scheme_Object **argv)
|
||||
{
|
||||
return collpaths_gen_p(argc, argv, 0, 1, 0, 0);
|
||||
|
@ -5188,8 +5155,6 @@ static Scheme_Object *current_library_collection_links(int argc, Scheme_Object *
|
|||
1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static Scheme_Object *compiled_kind_p(int argc, Scheme_Object **argv)
|
||||
{
|
||||
return collpaths_gen_p(argc, argv, 1, 0, 0, 0);
|
||||
|
@ -5262,8 +5227,6 @@ static Scheme_Object *use_compiled_file_check(int argc, Scheme_Object *argv[])
|
|||
|
||||
/********************************************************************************/
|
||||
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
|
||||
Scheme_Object *scheme_get_run_cmd(void)
|
||||
{
|
||||
if (!run_cmd) {
|
||||
|
@ -5355,32 +5318,26 @@ find_system_path(int argc, Scheme_Object **argv)
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* should only called from main */
|
||||
Scheme_Object *scheme_set_exec_cmd(char *s)
|
||||
{
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
if (!exec_cmd) {
|
||||
REGISTER_SO(exec_cmd);
|
||||
exec_cmd = scheme_make_path(s);
|
||||
}
|
||||
|
||||
return exec_cmd;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* should only called from main */
|
||||
Scheme_Object *scheme_set_run_cmd(char *s)
|
||||
{
|
||||
#ifndef NO_FILE_SYSTEM_UTILS
|
||||
if (!run_cmd) {
|
||||
REGISTER_SO(run_cmd);
|
||||
run_cmd = scheme_make_path(s);
|
||||
}
|
||||
|
||||
return run_cmd;
|
||||
#endif
|
||||
}
|
||||
|
||||
char *scheme_get_exec_path(void)
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
# endif
|
||||
# if defined(UNIX_FIND_STACK_BOUNDS) || defined(WINDOWS_FIND_STACK_BOUNDS) \
|
||||
|| defined(MACOS_FIND_STACK_BOUNDS) || defined(ASSUME_FIXED_STACK_SIZE) \
|
||||
|| defined(BEOS_FIND_STACK_BOUNDS) || defined(OSKIT_FIXED_STACK_BOUNDS) \
|
||||
|| defined(PALM_FIND_STACK_BOUNDS) || defined(PTHREAD_STACKSEG_FIND_STACK_BOUNDS)
|
||||
uintptr_t _stk_pos;
|
||||
|
||||
|
|
|
@ -1217,7 +1217,6 @@ static Scheme_Object *
|
|||
do_tcp_accept(int argc, Scheme_Object *argv[], Scheme_Object *cust, char **_fail_reason)
|
||||
/* If _fail_reason is not NULL, never raise an exception. */
|
||||
{
|
||||
#ifdef USE_TCP
|
||||
int was_closed = 0, ready_pos;
|
||||
Scheme_Object *listener;
|
||||
rktio_fd_t *s;
|
||||
|
@ -2655,8 +2654,6 @@ do_udp_multicast_join_or_leave_group(char const *name, int optname, Scheme_UDP *
|
|||
return scheme_void;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static Scheme_Object *
|
||||
udp_multicast_join_or_leave_group(char const *name, int optname, int argc, Scheme_Object *argv[])
|
||||
{
|
||||
|
|
|
@ -30,10 +30,6 @@ SHARED_OK static const char *embedded_load;
|
|||
|
||||
#ifdef MZ_USE_PLACES
|
||||
|
||||
#ifdef UNIX_PROCESSES
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "schmach.h"
|
||||
|
||||
READ_ONLY static Scheme_Object *scheme_def_place_exit_proc;
|
||||
|
|
|
@ -165,6 +165,7 @@ int scheme_get_serialized_fd_flags(Scheme_Object* p, Scheme_Serialized_File_FD *
|
|||
/******************** Globals and Prototypes ********************/
|
||||
|
||||
/* globals */
|
||||
|
||||
READ_ONLY Scheme_Object scheme_eof[1];
|
||||
THREAD_LOCAL_DECL(Scheme_Object *scheme_orig_stdout_port);
|
||||
THREAD_LOCAL_DECL(Scheme_Object *scheme_orig_stderr_port);
|
||||
|
@ -182,10 +183,10 @@ void scheme_set_binary_mode_stdio(int v) { scheme_binary_mode_stdio = v; }
|
|||
THREAD_LOCAL_DECL(static int special_is_ok);
|
||||
|
||||
/* locals */
|
||||
#ifdef USE_FD_PORTS
|
||||
|
||||
THREAD_LOCAL_DECL(static int fd_reserved);
|
||||
THREAD_LOCAL_DECL(static int the_fd);
|
||||
#endif
|
||||
|
||||
READ_ONLY static Scheme_Object *fd_input_port_type;
|
||||
READ_ONLY static Scheme_Object *file_input_port_type;
|
||||
READ_ONLY Scheme_Object *scheme_string_input_port_type;
|
||||
|
@ -208,10 +209,8 @@ SHARED_OK static int flush_err;
|
|||
|
||||
THREAD_LOCAL_DECL(static Scheme_Custodian *new_port_cust); /* back-door argument */
|
||||
|
||||
#if defined(FILES_HAVE_FDS)
|
||||
THREAD_LOCAL_DECL(static int external_event_fd);
|
||||
THREAD_LOCAL_DECL(static int put_external_event_fd);
|
||||
#endif
|
||||
|
||||
static void register_port_wait();
|
||||
|
||||
|
@ -281,8 +280,6 @@ THREAD_LOCAL_DECL(static char *read_string_byte_buffer);
|
|||
|
||||
#define fail_err_symbol scheme_false
|
||||
|
||||
#include "schwinfd.h"
|
||||
|
||||
typedef struct Scheme_Filesystem_Change_Evt {
|
||||
Scheme_Object so;
|
||||
rktio_fs_change_t *rfc;
|
||||
|
|
|
@ -975,11 +975,6 @@ MZ_EXTERN Scheme_Object *scheme_make_sized_offset_path(char *chars, intptr_t d,
|
|||
MZ_EXTERN Scheme_Object *scheme_make_sized_offset_kind_path(char *chars, intptr_t d, intptr_t len, int copy, int kind);
|
||||
MZ_EXTERN Scheme_Object *scheme_make_path_without_copying(char *chars);
|
||||
|
||||
#ifdef MACINTOSH_EVENTS
|
||||
MZ_EXTERN char *scheme_mac_spec_to_path(mzFSSpec *spec);
|
||||
MZ_EXTERN int scheme_mac_path_to_spec(const char *filename, mzFSSpec *spec);
|
||||
#endif
|
||||
|
||||
MZ_EXTERN void *scheme_alloc_fdset_array(int count, int permanent);
|
||||
MZ_EXTERN void *scheme_init_fdset_array(void *fdarray, int count);
|
||||
MZ_EXTERN void *scheme_get_fdset(void *fdarray, int pos);
|
||||
|
|
|
@ -123,7 +123,7 @@ int (*scheme_flush_managed)(Scheme_Plumber *p, int catch_errors);
|
|||
Scheme_Object *(*scheme_add_flush)(Scheme_Plumber *p, Scheme_Object *proc_or_port, int weak_flush);
|
||||
void (*scheme_remove_flush)(Scheme_Object *h);
|
||||
void (*scheme_add_atexit_closer)(Scheme_Exit_Closer_Func f);
|
||||
int (*scheme_atexit)(void (*func)());
|
||||
int (*scheme_atexit)(void (*func)(void));
|
||||
void (*scheme_add_evt)(Scheme_Type type,
|
||||
Scheme_Ready_Fun ready,
|
||||
Scheme_Needs_Wakeup_Fun wakeup,
|
||||
|
@ -807,10 +807,6 @@ Scheme_Object *(*scheme_make_sized_path)(char *chars, intptr_t len, int copy);
|
|||
Scheme_Object *(*scheme_make_sized_offset_path)(char *chars, intptr_t d, intptr_t len, int copy);
|
||||
Scheme_Object *(*scheme_make_sized_offset_kind_path)(char *chars, intptr_t d, intptr_t len, int copy, int kind);
|
||||
Scheme_Object *(*scheme_make_path_without_copying)(char *chars);
|
||||
#ifdef MACINTOSH_EVENTS
|
||||
char *(*scheme_mac_spec_to_path)(mzFSSpec *spec);
|
||||
int (*scheme_mac_path_to_spec)(const char *filename, mzFSSpec *spec);
|
||||
#endif
|
||||
void *(*scheme_alloc_fdset_array)(int count, int permanent);
|
||||
void *(*scheme_init_fdset_array)(void *fdarray, int count);
|
||||
void *(*scheme_get_fdset)(void *fdarray, int pos);
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
scheme_extension_table->scheme_add_flush = scheme_add_flush;
|
||||
scheme_extension_table->scheme_remove_flush = scheme_remove_flush;
|
||||
scheme_extension_table->scheme_add_atexit_closer = scheme_add_atexit_closer;
|
||||
scheme_extension_table->scheme_atexit = scheme_atexit
|
||||
scheme_extension_table->scheme_atexit = scheme_atexit;
|
||||
scheme_extension_table->scheme_add_evt = scheme_add_evt;
|
||||
scheme_extension_table->scheme_add_evt_through_sema = scheme_add_evt_through_sema;
|
||||
scheme_extension_table->scheme_is_evt = scheme_is_evt;
|
||||
|
@ -581,10 +581,6 @@
|
|||
scheme_extension_table->scheme_make_sized_offset_path = scheme_make_sized_offset_path;
|
||||
scheme_extension_table->scheme_make_sized_offset_kind_path = scheme_make_sized_offset_kind_path;
|
||||
scheme_extension_table->scheme_make_path_without_copying = scheme_make_path_without_copying;
|
||||
#ifdef MACINTOSH_EVENTS
|
||||
scheme_extension_table->scheme_mac_spec_to_path = scheme_mac_spec_to_path;
|
||||
scheme_extension_table->scheme_mac_path_to_spec = scheme_mac_path_to_spec;
|
||||
#endif
|
||||
scheme_extension_table->scheme_alloc_fdset_array = scheme_alloc_fdset_array;
|
||||
scheme_extension_table->scheme_init_fdset_array = scheme_init_fdset_array;
|
||||
scheme_extension_table->scheme_get_fdset = scheme_get_fdset;
|
||||
|
|
|
@ -581,10 +581,6 @@
|
|||
#define scheme_make_sized_offset_path (scheme_extension_table->scheme_make_sized_offset_path)
|
||||
#define scheme_make_sized_offset_kind_path (scheme_extension_table->scheme_make_sized_offset_kind_path)
|
||||
#define scheme_make_path_without_copying (scheme_extension_table->scheme_make_path_without_copying)
|
||||
#ifdef MACINTOSH_EVENTS
|
||||
#define scheme_mac_spec_to_path (scheme_extension_table->scheme_mac_spec_to_path)
|
||||
#define scheme_mac_path_to_spec (scheme_extension_table->scheme_mac_path_to_spec)
|
||||
#endif
|
||||
#define scheme_alloc_fdset_array (scheme_extension_table->scheme_alloc_fdset_array)
|
||||
#define scheme_init_fdset_array (scheme_extension_table->scheme_init_fdset_array)
|
||||
#define scheme_get_fdset (scheme_extension_table->scheme_get_fdset)
|
||||
|
|
|
@ -458,7 +458,6 @@ void scheme_init_exn_config(void);
|
|||
#endif
|
||||
#ifdef WINDOWS_PROCESSES
|
||||
void scheme_init_thread_memory(void);
|
||||
void scheme_release_process_job_object(void);
|
||||
#endif
|
||||
void scheme_init_module_resolver(void);
|
||||
|
||||
|
@ -768,15 +767,6 @@ void scheme_set_cpointer_tag(Scheme_Object *ptr, Scheme_Object *val);
|
|||
|
||||
void scheme_kickoff_green_thread_time_slice_timer(intptr_t usec);
|
||||
|
||||
#ifdef UNIX_PROCESSES
|
||||
void scheme_block_child_signals(int block);
|
||||
void scheme_check_child_done(void);
|
||||
int scheme_extract_child_status(int status);
|
||||
#endif
|
||||
#ifdef WINDOWS_GET_PROCESS_TIMES
|
||||
extern volatile uintptr_t scheme_process_children_msecs;
|
||||
#endif
|
||||
|
||||
void scheme_prepare_this_thread_for_GC(Scheme_Thread *t);
|
||||
|
||||
Scheme_Object **scheme_alloc_runstack(intptr_t len);
|
||||
|
@ -786,10 +776,6 @@ void scheme_check_runstack_edge(Scheme_Object **rs);
|
|||
void scheme_alloc_list_stack(Scheme_Thread *p);
|
||||
void scheme_clean_list_stack(Scheme_Thread *p);
|
||||
|
||||
#ifdef WIN32_THREADS
|
||||
void *scheme_win32_get_break_semaphore(void *th);
|
||||
#endif
|
||||
|
||||
Scheme_Object *scheme_get_thread_dead(Scheme_Thread *p);
|
||||
Scheme_Object *scheme_get_thread_suspend(Scheme_Thread *p);
|
||||
Scheme_Object *scheme_get_thread_sync(Scheme_Thread *p);
|
||||
|
@ -2107,7 +2093,6 @@ typedef struct Scheme_Overflow {
|
|||
|
||||
#if defined(UNIX_FIND_STACK_BOUNDS) || defined(WINDOWS_FIND_STACK_BOUNDS) \
|
||||
|| defined(MACOS_FIND_STACK_BOUNDS) || defined(ASSUME_FIXED_STACK_SIZE) \
|
||||
|| defined(BEOS_FIND_STACK_BOUNDS) || defined(OSKIT_FIXED_STACK_BOUNDS) \
|
||||
|| defined(PALM_FIND_STACK_BOUNDS) || defined(PTHREAD_STACKSEG_FIND_STACK_BOUNDS)
|
||||
# define USE_STACK_BOUNDARY_VAR
|
||||
THREAD_LOCAL_DECL(extern uintptr_t scheme_stack_boundary);
|
||||
|
@ -2649,15 +2634,9 @@ Scheme_Object *scheme_floor(int argc, Scheme_Object *argv[]);
|
|||
|
||||
Scheme_Object *scheme_bytes_to_integer(char *str, int slen, int sgned, int rshft, int mask);
|
||||
|
||||
#ifdef TIME_TYPE_IS_UNSIGNED
|
||||
# define scheme_make_integer_value_from_time(t) scheme_make_integer_value_from_unsigned((uintptr_t)t)
|
||||
# define scheme_get_time_val(o, v) scheme_get_unsigned_int_val(o, v)
|
||||
# define UNBUNDLE_TIME_TYPE uintptr_t
|
||||
#else
|
||||
# define scheme_make_integer_value_from_time(t) scheme_make_integer_value((intptr_t)t)
|
||||
# define scheme_get_time_val(o, v) scheme_get_int_val(o, v)
|
||||
# define UNBUNDLE_TIME_TYPE intptr_t
|
||||
#endif
|
||||
#define scheme_make_integer_value_from_time(t) scheme_make_integer_value((intptr_t)t)
|
||||
#define scheme_get_time_val(o, v) scheme_get_int_val(o, v)
|
||||
#define UNBUNDLE_TIME_TYPE intptr_t
|
||||
|
||||
/***** Random number generator *****/
|
||||
|
||||
|
@ -4237,23 +4216,12 @@ char *scheme_normal_path_seps(char *s, int *_len, int delta);
|
|||
|
||||
int scheme_is_regular_file(char *filename);
|
||||
|
||||
#ifdef MAC_FILE_SYSTEM
|
||||
void scheme_file_create_hook(char *filename);
|
||||
#endif
|
||||
|
||||
void scheme_do_format(const char *procname, Scheme_Object *port,
|
||||
const mzchar *format, int flen,
|
||||
int fpos, int offset, int argc, Scheme_Object **argv);
|
||||
|
||||
Scheme_Object *scheme_load_with_clrd(int argc, Scheme_Object *argv[], char *who, int handler_param);
|
||||
|
||||
#ifdef MAC_CLASSIC_PROCESS_CONTROL
|
||||
int scheme_mac_start_app(char *name, int find_path, Scheme_Object *s);
|
||||
#endif
|
||||
#ifdef MACINTOSH_EVENTS
|
||||
int scheme_mac_send_event(char *name, int argc, Scheme_Object **argv, Scheme_Object **result, int *err, char **stage);
|
||||
#endif
|
||||
|
||||
Scheme_Object *scheme_default_load_extension(int argc, Scheme_Object **argv);
|
||||
|
||||
Scheme_Object *scheme_remove_current_directory_prefix(Scheme_Object *fn);
|
||||
|
@ -4298,15 +4266,6 @@ extern char *scheme_convert_from_wchar(const wchar_t *ws);
|
|||
/* ports */
|
||||
/*========================================================================*/
|
||||
|
||||
#ifdef NO_TCP_SUPPORT
|
||||
# undef USE_UNIX_SOCKETS_TCP
|
||||
# undef USE_WINSOCK_TCP
|
||||
#endif
|
||||
|
||||
#if defined(USE_UNIX_SOCKETS_TCP) || defined(USE_WINSOCK_TCP)
|
||||
# define USE_TCP
|
||||
#endif
|
||||
|
||||
THREAD_LOCAL_DECL(extern int scheme_active_but_sleeping);
|
||||
|
||||
struct rktio_fd_t;
|
||||
|
@ -4340,10 +4299,8 @@ extern Scheme_Object *scheme_user_output_port_type;
|
|||
extern Scheme_Object *scheme_pipe_read_port_type;
|
||||
extern Scheme_Object *scheme_pipe_write_port_type;
|
||||
extern Scheme_Object *scheme_null_output_port_type;
|
||||
#ifdef USE_TCP
|
||||
extern Scheme_Object *scheme_tcp_input_port_type;
|
||||
extern Scheme_Object *scheme_tcp_output_port_type;
|
||||
#endif
|
||||
|
||||
THREAD_LOCAL_DECL(extern int scheme_force_port_closed);
|
||||
|
||||
|
@ -4411,12 +4368,6 @@ intptr_t scheme_port_closed_p (Scheme_Object *port);
|
|||
#define CURRENT_OUTPUT_PORT(config) scheme_get_param(config, MZCONFIG_OUTPUT_PORT)
|
||||
#define CHECK_PORT_CLOSED(who, kind, port, closed) if (closed) scheme_raise_exn(MZEXN_FAIL, "%s: " kind " port is closed", who);
|
||||
|
||||
#if defined(USE_FCNTL_O_NONBLOCK)
|
||||
# define MZ_NONBLOCKING O_NONBLOCK
|
||||
#else
|
||||
# define MZ_NONBLOCKING FNDELAY
|
||||
#endif
|
||||
|
||||
#define MAX_UTF8_CHAR_BYTES 6
|
||||
|
||||
intptr_t scheme_redirect_write_bytes(Scheme_Output_Port *op,
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
|
||||
#if defined(WINDOWS_PROCESSES) || defined(DETECT_WIN32_CONSOLE_STDIN) || defined(USE_BEOS_PORT_THREADS)
|
||||
# ifndef NO_STDIO_THREADS
|
||||
typedef struct {
|
||||
/* All fields must be pointers */
|
||||
|
||||
SOCKET *sockets;
|
||||
|
||||
Scheme_Object *added; /* fixnum */
|
||||
Scheme_Object *alloc; /* fixnum */
|
||||
Scheme_Object *last_alloc; /* fixnum */
|
||||
|
||||
Scheme_Object *num_handles; /* fixnum */
|
||||
Scheme_Object *alloc_handles; /* fixnum */
|
||||
Scheme_Object *last_alloc_handles; /* fixnum */
|
||||
OS_SEMAPHORE_TYPE *handles;
|
||||
|
||||
int *repost_sema;
|
||||
|
||||
Scheme_Object *no_sleep; /* boolean */
|
||||
|
||||
Scheme_Object *wait_event_mask; /* fixnum */
|
||||
|
||||
HANDLE *wait_array;
|
||||
|
||||
HANDLE *combined_wait_array;
|
||||
Scheme_Object *combined_len; /* fixnum */
|
||||
} win_extended_fd_set;
|
||||
# endif
|
||||
#endif
|
|
@ -5688,63 +5688,6 @@ mzchar *scheme_utf16_to_ucs4(const unsigned short *text, intptr_t start, intptr_
|
|||
/* machine type details */
|
||||
/**********************************************************************/
|
||||
|
||||
/**************************** MacOS ***********************************/
|
||||
|
||||
#if defined(MACINTOSH_EVENTS) && !defined(OS_X)
|
||||
# include <Gestalt.h>
|
||||
extern intptr_t scheme_this_ip(void);
|
||||
static void machine_details(char *s)
|
||||
{
|
||||
OSErr err;
|
||||
intptr_t lng;
|
||||
char sysvers[30];
|
||||
char machine_name[256];
|
||||
|
||||
err = Gestalt(gestaltSystemVersion, &lng);
|
||||
if (err != noErr) {
|
||||
strcpy(sysvers, "<unknown system>");
|
||||
} else {
|
||||
int i;
|
||||
sprintf(sysvers, "%X.%X",
|
||||
(lng >> 8) & 0xff,
|
||||
lng & 0xff);
|
||||
/* remove trailing zeros, put dot before something else */
|
||||
i = strlen(sysvers);
|
||||
if (i > 1) {
|
||||
if (sysvers[i-1] != '.') {
|
||||
if (sysvers[i-1] == '0') {
|
||||
sysvers[i-1] = 0;
|
||||
i--;
|
||||
} else {
|
||||
sysvers[i] = sysvers[i-1];
|
||||
sysvers[i-1] = '.';
|
||||
i++;
|
||||
sysvers[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
err = Gestalt(gestaltMachineType, &lng);
|
||||
if (err != noErr) {
|
||||
strcpy(machine_name, "<unknown machine>");
|
||||
} else {
|
||||
Str255 machine_name_pascal;
|
||||
|
||||
GetIndString(machine_name_pascal, kMachineNameStrID, lng);
|
||||
CopyPascalStringToC(machine_name_pascal, machine_name);
|
||||
}
|
||||
|
||||
lng = scheme_this_ip();
|
||||
|
||||
sprintf(s, "%s %s %d.%d.%d.%d", sysvers, machine_name,
|
||||
((unsigned char *)&lng)[0],
|
||||
((unsigned char *)&lng)[1],
|
||||
((unsigned char *)&lng)[2],
|
||||
((unsigned char *)&lng)[3]);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*************************** Windows **********************************/
|
||||
|
||||
#ifdef DOS_FILE_SYSTEM
|
||||
|
@ -5785,18 +5728,9 @@ void machine_details(char *buff)
|
|||
}
|
||||
#endif
|
||||
|
||||
/***************************** OSKit **********************************/
|
||||
|
||||
#ifdef USE_OSKIT_CONSOLE
|
||||
void machine_details(char *buff)
|
||||
{
|
||||
strcpy(buff, "OSKit");
|
||||
}
|
||||
#endif
|
||||
|
||||
/***************************** Unix ***********************************/
|
||||
|
||||
#if (!defined(MACINTOSH_EVENTS) || defined(OS_X)) && !defined(DOS_FILE_SYSTEM) && !defined(USE_OSKIT_CONSOLE)
|
||||
#if !defined(DOS_FILE_SYSTEM)
|
||||
READ_ONLY static char *uname_locations[] = { "/bin/uname",
|
||||
"/usr/bin/uname",
|
||||
/* The above should cover everything, but
|
||||
|
|
|
@ -48,24 +48,11 @@
|
|||
#ifdef USE_STACKAVAIL
|
||||
# include <malloc.h>
|
||||
#endif
|
||||
#ifdef UNISTD_INCLUDE
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef SIGNMZTHREAD
|
||||
# define SIGMZTHREAD SIGUSR2
|
||||
#endif
|
||||
|
||||
#if defined(FILES_HAVE_FDS) \
|
||||
|| defined(USE_BEOS_PORT_THREADS) \
|
||||
|| (defined(USE_WINSOCK_TCP) && defined(USE_TCP)) \
|
||||
|| (defined(WINDOWS_PROCESSES) || defined(WINDOWS_FILE_HANDLES))
|
||||
# define USING_FDS
|
||||
# if (!defined(USE_WINSOCK_TCP) || !defined(USE_TCP)) && !defined(FILES_HAVE_FDS)
|
||||
# include <sys/types.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define DEFAULT_INIT_STACK_SIZE 1000
|
||||
#define MAX_INIT_STACK_SIZE 100000
|
||||
|
||||
|
@ -4754,10 +4741,6 @@ void scheme_thread_block(float sleep_time)
|
|||
|
||||
swap_or_sleep:
|
||||
|
||||
#ifdef USE_OSKIT_CONSOLE
|
||||
scheme_check_keyboard_input();
|
||||
#endif
|
||||
|
||||
/* Check scheduled_kills early and often. */
|
||||
check_scheduled_kills();
|
||||
|
||||
|
|
|
@ -5,23 +5,8 @@
|
|||
#define SYSTEM_TYPE_NAME "unix"
|
||||
#define UNIX_FILE_SYSTEM
|
||||
|
||||
#define PROCESS_FUNCTION
|
||||
#define DIR_FUNCTION
|
||||
#define GETENV_FUNCTION
|
||||
|
||||
#define USE_FD_PORTS
|
||||
#define HAS_STANDARD_IOB
|
||||
#define FILES_HAVE_FDS
|
||||
#define USE_UNIX_SOCKETS_TCP
|
||||
#define USE_FLOCK_FOR_FILE_LOCKS
|
||||
|
||||
#define UNIX_PROCESSES
|
||||
#define CLOSE_ALL_FDS_AFTER_FORK
|
||||
|
||||
#define USE_C_SYSLOG
|
||||
|
||||
#define EXPAND_FILENAME_TILDE
|
||||
|
||||
#define DO_STACK_CHECK
|
||||
#ifndef ASSUME_FIXED_STACK_SIZE
|
||||
# define UNIX_FIND_STACK_BOUNDS
|
||||
|
@ -30,11 +15,6 @@
|
|||
|
||||
#define UNIX_DYNAMIC_LOAD
|
||||
|
||||
#define UNISTD_INCLUDE
|
||||
#define USE_FCHDIR
|
||||
|
||||
#define USE_GETRUSAGE
|
||||
|
||||
#ifndef MZ_USE_DETERMINSTIC_FUEL
|
||||
# if defined(MZ_USE_PLACES) || defined(USE_PTHREAD_INSTEAD_OF_ITIMER)
|
||||
# define USE_PTHREAD_THREAD_TIMER
|
||||
|
|
|
@ -304,9 +304,9 @@
|
|||
be able to go from no-char-ready to char-ready while Racket is
|
||||
sleeping. */
|
||||
|
||||
/* USE_TRANSITIONAL_64_FILE_OPS uses fseeko64, lseek64, stat64, etc.
|
||||
for file operations involving sizes (that can require 64-bit
|
||||
arithmetic). The `configure` script normally finds this one. */
|
||||
/* USE_TRANSITIONAL_64_FILE_OPS uses lseek64, stat64, etc. for file
|
||||
operations involving sizes (that can require 64-bit
|
||||
arithmetic). */
|
||||
|
||||
/* USE_ULIMIT uses ulimit instead of getdtablesize. */
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user