263
281
#ifndef IRIX4 /* fix for compiler bug */
264
283
#ifdef RETSIGTYPE
265
284
typedef RETSIGTYPE (*SigAction)(int);
266
285
SigAction signal(int iSig, SigAction pAction); /* BSD compatible */
290
#define SE_E_UNSPECIFIED (-1)
291
#define SE_E_FORKFAILED (-2)
292
#define SE_E_WAITPIDFAILED (-3)
293
#define SE_E_EXECTIMEOUT (-4)
294
#define SE_E_NOEXEC 126
295
#define SE_E_NOTFOUND 127
297
#define SE_PROCSTATUS(st) (((st) >= 0 && (st) < 126)? st: -1)
298
#define SE_PROCSIGNAL(st) (((st) >= 128)? (st) - 128: -1)
299
#define SE_IS_ERROR(st) ((st) < 0 || (st) >= 126)
270
302
#define simple_execve rk_simple_execve
271
int ROKEN_LIB_FUNCTION
303
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
272
304
simple_execve(const char*, char*const[], char*const[]);
274
306
#define simple_execve_timed rk_simple_execve_timed
275
int ROKEN_LIB_FUNCTION
307
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
276
308
simple_execve_timed(const char *, char *const[],
277
309
char *const [], time_t (*)(void *),
280
312
#define simple_execvp rk_simple_execvp
281
int ROKEN_LIB_FUNCTION
313
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
282
314
simple_execvp(const char*, char *const[]);
284
316
#define simple_execvp_timed rk_simple_execvp_timed
285
int ROKEN_LIB_FUNCTION
317
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
286
318
simple_execvp_timed(const char *, char *const[],
287
319
time_t (*)(void *), void *, time_t);
289
321
#define simple_execlp rk_simple_execlp
290
int ROKEN_LIB_FUNCTION
322
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
291
323
simple_execlp(const char*, ...);
293
325
#define simple_execle rk_simple_execle
294
int ROKEN_LIB_FUNCTION
326
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
295
327
simple_execle(const char*, ...);
297
329
#define wait_for_process rk_wait_for_process
298
int ROKEN_LIB_FUNCTION
330
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
299
331
wait_for_process(pid_t);
301
333
#define wait_for_process_timed rk_wait_for_process_timed
302
int ROKEN_LIB_FUNCTION
334
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
303
335
wait_for_process_timed(pid_t, time_t (*)(void *),
305
338
#define pipe_execv rk_pipe_execv
306
int ROKEN_LIB_FUNCTION
339
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
307
340
pipe_execv(FILE**, FILE**, FILE**, const char*, ...);
309
342
#define print_version rk_print_version
310
void ROKEN_LIB_FUNCTION
343
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
311
344
print_version(const char *);
313
346
#define eread rk_eread
314
ssize_t ROKEN_LIB_FUNCTION
347
ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
315
348
eread (int fd, void *buf, size_t nbytes);
317
350
#define ewrite rk_ewrite
318
ssize_t ROKEN_LIB_FUNCTION
351
ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
319
352
ewrite (int fd, const void *buf, size_t nbytes);
323
356
#define hostent_find_fqdn rk_hostent_find_fqdn
324
const char * ROKEN_LIB_FUNCTION
357
ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL
325
358
hostent_find_fqdn (const struct hostent *);
327
360
#define esetenv rk_esetenv
328
void ROKEN_LIB_FUNCTION
361
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
329
362
esetenv(const char *, const char *, int);
331
364
#define socket_set_address_and_port rk_socket_set_address_and_port
332
void ROKEN_LIB_FUNCTION
365
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
333
366
socket_set_address_and_port (struct sockaddr *, const void *, int);
335
368
#define socket_addr_size rk_socket_addr_size
336
size_t ROKEN_LIB_FUNCTION
369
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
337
370
socket_addr_size (const struct sockaddr *);
339
372
#define socket_set_any rk_socket_set_any
340
void ROKEN_LIB_FUNCTION
373
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
341
374
socket_set_any (struct sockaddr *, int);
343
376
#define socket_sockaddr_size rk_socket_sockaddr_size
344
size_t ROKEN_LIB_FUNCTION
377
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
345
378
socket_sockaddr_size (const struct sockaddr *);
347
380
#define socket_get_address rk_socket_get_address
348
void * ROKEN_LIB_FUNCTION
381
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
349
382
socket_get_address (const struct sockaddr *);
351
384
#define socket_get_port rk_socket_get_port
352
int ROKEN_LIB_FUNCTION
385
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
353
386
socket_get_port (const struct sockaddr *);
355
388
#define socket_set_port rk_socket_set_port
356
void ROKEN_LIB_FUNCTION
389
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
357
390
socket_set_port (struct sockaddr *, int);
359
392
#define socket_set_portrange rk_socket_set_portrange
360
void ROKEN_LIB_FUNCTION
361
socket_set_portrange (int, int, int);
393
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
394
socket_set_portrange (rk_socket_t, int, int);
363
396
#define socket_set_debug rk_socket_set_debug
364
void ROKEN_LIB_FUNCTION
365
socket_set_debug (int);
397
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
398
socket_set_debug (rk_socket_t);
367
400
#define socket_set_tos rk_socket_set_tos
368
void ROKEN_LIB_FUNCTION
369
socket_set_tos (int, int);
401
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
402
socket_set_tos (rk_socket_t, int);
371
404
#define socket_set_reuseaddr rk_socket_set_reuseaddr
372
void ROKEN_LIB_FUNCTION
373
socket_set_reuseaddr (int, int);
405
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
406
socket_set_reuseaddr (rk_socket_t, int);
375
408
#define socket_set_ipv6only rk_socket_set_ipv6only
376
void ROKEN_LIB_FUNCTION
377
socket_set_ipv6only (int, int);
409
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
410
socket_set_ipv6only (rk_socket_t, int);
412
#define socket_to_fd rk_socket_to_fd
413
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
414
socket_to_fd(rk_socket_t, int);
379
416
#define vstrcollect rk_vstrcollect
380
char ** ROKEN_LIB_FUNCTION
417
ROKEN_LIB_FUNCTION char ** ROKEN_LIB_CALL
381
418
vstrcollect(va_list *ap);
383
420
#define strcollect rk_strcollect
384
char ** ROKEN_LIB_FUNCTION
421
ROKEN_LIB_FUNCTION char ** ROKEN_LIB_CALL
385
422
strcollect(char *first, ...);
387
424
#define timevalfix rk_timevalfix
388
void ROKEN_LIB_FUNCTION
425
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
389
426
timevalfix(struct timeval *t1);
391
428
#define timevaladd rk_timevaladd
392
void ROKEN_LIB_FUNCTION
429
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
393
430
timevaladd(struct timeval *t1, const struct timeval *t2);
395
432
#define timevalsub rk_timevalsub
396
void ROKEN_LIB_FUNCTION
433
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
397
434
timevalsub(struct timeval *t1, const struct timeval *t2);
399
436
#define pid_file_write rk_pid_file_write
400
char *ROKEN_LIB_FUNCTION
437
ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL
401
438
pid_file_write (const char *progname);
403
440
#define pid_file_delete rk_pid_file_delete
404
void ROKEN_LIB_FUNCTION
441
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
405
442
pid_file_delete (char **);
407
444
#define read_environment rk_read_environment
408
int ROKEN_LIB_FUNCTION
445
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
409
446
read_environment(const char *file, char ***env);
411
448
#define free_environment rk_free_environment
412
void ROKEN_LIB_FUNCTION
449
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
413
450
free_environment(char **);
415
452
#define warnerr rk_warnerr
416
void ROKEN_LIB_FUNCTION
453
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
417
454
rk_warnerr(int doerrno, const char *fmt, va_list ap)
418
455
__attribute__ ((format (printf, 2, 0)));
420
void * ROKEN_LIB_FUNCTION
457
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
421
458
rk_realloc(void *, size_t);
423
460
struct rk_strpool;
425
char * ROKEN_LIB_FUNCTION
462
ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL
426
463
rk_strpoolcollect(struct rk_strpool *);
428
struct rk_strpool * ROKEN_LIB_FUNCTION
465
ROKEN_LIB_FUNCTION struct rk_strpool * ROKEN_LIB_CALL
429
466
rk_strpoolprintf(struct rk_strpool *, const char *, ...)
430
467
__attribute__ ((format (printf, 2, 3)));
432
void ROKEN_LIB_FUNCTION
469
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
433
470
rk_strpoolfree(struct rk_strpool *);
435
void ROKEN_LIB_FUNCTION
472
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
436
473
rk_dumpdata (const char *, const void *, size_t);
438
int ROKEN_LIB_FUNCTION
475
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
439
476
rk_undumpdata (const char *, void **, size_t *);
441
void ROKEN_LIB_FUNCTION
478
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
442
479
rk_xfree (void *);
444
void ROKEN_LIB_FUNCTION
481
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
447
void ROKEN_LIB_FUNCTION
484
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
448
485
rk_cloexec_file(FILE *);
487
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
488
rk_cloexec_dir(DIR *);
490
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
491
ct_memcmp(const void *, const void *, size_t);
493
void ROKEN_LIB_FUNCTION
494
rk_random_init(void);