1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
|
/* File: "os_setup.h" */
/* Copyright (c) 1994-2018 by Marc Feeley, All Rights Reserved. */
#ifndef ___OS_SETUP_H
#define ___OS_SETUP_H
#include "os.h"
#include "os_tty.h"
#include "os_time.h"
#include "os_io.h"
/*---------------------------------------------------------------------------*/
/* Miscellaneous POSIX utility functions. */
#ifdef USE_POSIX
extern pid_t ___waitpid_no_EINTR
___P((pid_t pid,
int *stat_loc,
int options),
());
extern ___SSIZE_T ___read_no_EINTR
___P((int fd,
void *buf,
___SIZE_T len),
());
extern int ___close_no_EINTR
___P((int fd),
());
extern int ___dup_no_EINTR
___P((int fd),
());
extern int ___dup2_no_EINTR
___P((int fd,
int fd2),
());
extern int ___set_fd_blocking_mode
___P((int fd,
___BOOL blocking),
());
extern int ___open_half_duplex_pipe
___P((___half_duplex_pipe *hdp),
());
extern void ___close_half_duplex_pipe
___P((___half_duplex_pipe *hdp,
int end),
());
#endif
/* Interrupt handling. */
extern void ___cleanup_all_interrupt_handling ___PVOID;
/* CPU information. */
extern int ___cpu_count ___PVOID;
extern int ___cpu_cache_size
___P((___BOOL instruction_cache,
int level),
());
extern int ___core_count ___PVOID;
/* Virtual memory statistics. */
extern void ___vm_stats
___P((___SIZE_TS *minflt,
___SIZE_TS *majflt),
());
/* Formatting of source code position. */
extern char *___format_filepos
___P((char *path,
___SIZE_TS filepos,
___BOOL pinpoint),
());
/* Change file times. */
extern ___SCMOBJ ___os_file_times_set
___P((___SCMOBJ path,
___SCMOBJ modification_time,
___SCMOBJ access_time),
());
/* Access to file information. */
extern ___SCMOBJ ___os_file_info
___P((___SCMOBJ path,
___SCMOBJ chase),
());
/* Access to user information. */
extern ___SCMOBJ ___os_user_info
___P((___SCMOBJ user),
());
extern ___SCMOBJ ___os_user_name ___PVOID;
/* Access to group information. */
extern ___SCMOBJ ___os_group_info
___P((___SCMOBJ group),
());
/* Access to host information. */
extern ___SCMOBJ ___os_address_infos
___P((___SCMOBJ host,
___SCMOBJ serv,
___SCMOBJ flags,
___SCMOBJ family,
___SCMOBJ socktype,
___SCMOBJ protocol),
());
extern ___SCMOBJ ___os_host_info
___P((___SCMOBJ host),
());
extern ___SCMOBJ ___os_host_name ___PVOID;
#ifdef USE_NETWORKING
extern ___SCMOBJ ___SCMOBJ_to_in_addr
___P((___SCMOBJ addr,
struct in_addr *ia,
int arg_num),
());
extern ___SCMOBJ ___in_addr_to_SCMOBJ
___P((struct in_addr *ia,
int arg_num),
());
#ifdef USE_IPV6
extern ___SCMOBJ ___SCMOBJ_to_in6_addr
___P((___SCMOBJ addr,
struct in6_addr *ia,
int arg_num),
());
extern ___SCMOBJ ___in6_addr_to_SCMOBJ
___P((struct in6_addr *ia,
int arg_num),
());
#endif
extern ___SCMOBJ ___SCMOBJ_to_sockaddr
___P((___SCMOBJ addr,
___SCMOBJ port_num,
struct sockaddr *sa,
SOCKET_LEN_TYPE *salen,
int arg_num),
());
extern ___SCMOBJ ___sockaddr_to_SCMOBJ
___P((struct sockaddr *sa,
SOCKET_LEN_TYPE salen,
int arg_num),
());
extern ___BOOL sockaddr_equal
___P((struct sockaddr *sa1,
SOCKET_LEN_TYPE salen1,
struct sockaddr *sa2,
SOCKET_LEN_TYPE salen2),
());
#endif
/* Access to service information. */
extern ___SCMOBJ ___os_service_info
___P((___SCMOBJ service,
___SCMOBJ protocol),
());
/* Access to protocol information. */
extern ___SCMOBJ ___os_protocol_info
___P((___SCMOBJ protocol),
());
/* Access to network information. */
extern ___SCMOBJ ___os_network_info
___P((___SCMOBJ network),
());
/* Access to process information. */
extern ___SCMOBJ ___os_getpid ___PVOID;
extern ___SCMOBJ ___os_getppid ___PVOID;
/* System type information. */
extern char **___os_system_type ___PVOID;
extern char *___os_system_type_string ___PVOID;
extern char *___os_configure_command_string ___PVOID;
/* C compilation environment information. */
extern char *___os_obj_extension_string ___PVOID;
extern char *___os_exe_extension_string ___PVOID;
extern char *___os_bat_extension_string ___PVOID;
/* OS initialization/finalization. */
extern ___SCMOBJ ___setup_os_pstate
___P((___processor_state ___ps),
());
extern void ___cleanup_os_pstate
___P((___processor_state ___ps),
());
extern ___SCMOBJ ___setup_os_vmstate
___P((___virtual_machine_state ___vms),
());
extern void ___cleanup_os_vmstate
___P((___virtual_machine_state ___vms),
());
extern ___SCMOBJ ___setup_os ___PVOID;
extern void ___cleanup_os ___PVOID;
/*---------------------------------------------------------------------------*/
#endif
|