[CABMAN]
[reactos.git] / reactos / sdk / tools / mkisofs / schilytools / include / schily / schily.h
1 /* @(#)schily.h 1.122 16/12/18 Copyright 1985-2016 J. Schilling */
2 /*
3 * Definitions for libschily
4 *
5 * This file should be included past:
6 *
7 * schily/mconfig.h / config.h
8 * schily/standard.h
9 * stdio.h
10 * stdlib.h (better use schily/stdlib.h)
11 * unistd.h (better use schily/unistd.h) needed f. LARGEFILE support
12 * schily/string.h
13 * sys/types.h
14 *
15 * If you need stdio.h, you must include it before schily/schily.h
16 *
17 * NOTE: If you need ctype.h and did not include stdio.h you need to
18 * include ctype.h past schily/schily.h as OpenBSD does not follow POSIX
19 * and defines EOF in ctype.h
20 *
21 * Copyright (c) 1985-2016 J. Schilling
22 */
23 /*
24 * The contents of this file are subject to the terms of the
25 * Common Development and Distribution License, Version 1.0 only
26 * (the "License"). You may not use this file except in compliance
27 * with the License.
28 *
29 * See the file CDDL.Schily.txt in this distribution for details.
30 * A copy of the CDDL is also available via the Internet at
31 * http://www.opensource.org/licenses/cddl1.txt
32 *
33 * When distributing Covered Code, include this CDDL HEADER in each
34 * file and include the License file CDDL.Schily.txt from this distribution.
35 */
36
37 #ifndef _SCHILY_SCHILY_H
38 #define _SCHILY_SCHILY_H
39
40 #ifndef _SCHILY_MCONFIG_H
41 #include <schily/mconfig.h>
42 #endif
43
44 #ifndef _SCHILY_STANDARD_H
45 #include <schily/standard.h>
46 #endif
47 #ifndef _SCHILY_CCOMDEFS_H
48 #include <schily/ccomdefs.h>
49 #endif
50 #ifndef _SCHILY_STDINT_H
51 #include <schily/stdint.h>
52 #endif
53
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57
58 #if defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_H) || defined(off_t)
59 # ifndef FOUND_OFF_T
60 # define FOUND_OFF_T
61 # endif
62 #endif
63 #if defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_H) || defined(size_t)
64 # ifndef FOUND_SIZE_T
65 # define FOUND_SIZE_T
66 # endif
67 #endif
68 #if defined(_MSC_VER) && !defined(_SIZE_T_DEFINED)
69 # undef FOUND_SIZE_T
70 #endif
71
72 #ifdef __never_def__
73 /*
74 * It turns out that we cannot use the folloginw definition because there are
75 * some platforms that do not behave application friendly. These are mainly
76 * BSD-4.4 based systems (which #undef a definition when size_t is available.
77 * We actually removed this code because of a problem with QNX Neutrino.
78 * For this reason, it is important not to include <sys/types.h> directly but
79 * via the Schily SING include files so we know whether it has been included
80 * before we come here.
81 */
82 #if defined(_SIZE_T) || defined(_T_SIZE_) || defined(_T_SIZE) || \
83 defined(__SIZE_T) || defined(_SIZE_T_) || \
84 defined(_GCC_SIZE_T) || defined(_SIZET_) || \
85 defined(__sys_stdtypes_h) || defined(___int_size_t_h) || defined(size_t)
86
87 #ifndef FOUND_SIZE_T
88 # define FOUND_SIZE_T /* We already included a size_t definition */
89 #endif
90 #endif
91 #endif /* __never_def__ */
92
93 #if defined(HAVE_LARGEFILES)
94 # define _fcons _fcons64
95 # define fdup fdup64
96 # define fileluopen fileluopen64
97 # define fileopen fileopen64
98 # define filemopen filemopen64
99 # define filepos filepos64
100 # define filereopen filereopen64
101 # define fileseek fileseek64
102 # define filesize filesize64
103 # define filestat filestat64
104 # define _openfd _openfd64
105 #endif
106
107 /*
108 * The official POSIX rule is not to define "new" interfaces that
109 * are in conflict with older interfaces of the same name.
110 * Our interfaces fexec*() have been defined and published in 1982.
111 * The new POSIX interfaces define a different interface and the
112 * new POSIX interfaces even use names that are not compatible with
113 * POSIX rules. The new POSIX interfaces in question should be called
114 * fdexec*() to follow the rules of other similar POSIX functions.
115 * Simiar problems exist with getline()/fgetline().
116 */
117 #if defined(HAVE_RAW_FEXECL) || defined(HAVE_RAW_FEXECLE) || \
118 defined(HAVE_RAW_FEXECV) || defined(HAVE_RAW_FEXECVE)
119 #define RENAME_FEXEC
120 #endif
121 #if defined(HAVE_RAW_FSPAWNV) || defined(HAVE_RAW_FSPAWNL) || \
122 defined(HAVE_RAW_FSPAWNV_NOWAIT)
123 #define RENAME_FSPAWN
124 #endif
125 #if defined(HAVE_RAW_GETLINE) || defined(HAVE_RAW_FGETLINE)
126 #define RENAME_GETLINE
127 #endif
128
129 #ifdef __needed__
130 #define RENAME_FEXEC
131 #define RENAME_FSPAWN
132 #define RENAME_GETLINE
133 #endif
134
135 #if defined(RENAME_FEXEC) || defined(RENAME_FSPAWN)
136 #ifndef _SCHILY_UNISTD_H
137 #include <schily/unistd.h> /* Need to incl. before fexec*() protoypes */
138 #endif
139 #endif
140
141 #if defined(RENAME_GETLINE)
142 #ifndef _SCHILY_STDIO_H
143 #include <schily/stdio.h> /* Need to incl. before *getline() protoypes */
144 #endif
145
146 #endif
147
148 #ifdef EOF /* stdio.h has been included */
149
150 extern int _cvmod __PR((const char *, int *, int *));
151 extern FILE *_fcons __PR((FILE *, int, int));
152 extern FILE *fdup __PR((FILE *));
153 #if !defined(fdown) || defined(PROTOTYPES)
154 /*
155 * We cannot declare fdown() with K&R in case that fdown() has been #define'd
156 */
157 extern int fdown __PR((FILE *));
158 #endif
159 extern int js_fexecl __PR((const char *, FILE *, FILE *, FILE *,
160 const char *, ...));
161 extern int js_fexecle __PR((const char *, FILE *, FILE *, FILE *,
162 const char *, ...));
163 /* 6th arg not const, fexecv forces av[ac] = NULL */
164 extern int js_fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
165 char **));
166 extern int js_fexecve __PR((const char *, FILE *, FILE *, FILE *,
167 char * const *, char * const *));
168 extern int js_fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
169 extern int js_fspawnl __PR((FILE *, FILE *, FILE *, const char *, ...));
170 extern int js_fspawnv_nowait __PR((FILE *, FILE *, FILE *,
171 const char *, int, char *const*));
172 extern int js_fgetline __PR((FILE *, char *, int));
173 #ifdef FOUND_SIZE_T
174 extern ssize_t fgetaline __PR((FILE *, char **, size_t *));
175 extern ssize_t getaline __PR((char **, size_t *));
176 #endif
177 extern int fgetstr __PR((FILE *, char *, int));
178 extern int file_getraise __PR((FILE *));
179 extern void file_raise __PR((FILE *, int));
180 extern int fileclose __PR((FILE *));
181 extern FILE *fileluopen __PR((int, const char *));
182 extern FILE *fileopen __PR((const char *, const char *));
183 #ifdef _SCHILY_TYPES_H
184 extern FILE *filemopen __PR((const char *, const char *, mode_t));
185 #endif
186 #ifdef FOUND_OFF_T
187 extern off_t filepos __PR((FILE *));
188 #endif
189 #ifdef FOUND_SIZE_T
190 extern ssize_t fileread __PR((FILE *, void *, size_t));
191 extern ssize_t ffileread __PR((FILE *, void *, size_t));
192 #endif
193 extern FILE *filereopen __PR((const char *, const char *, FILE *));
194 #ifdef FOUND_OFF_T
195 extern int fileseek __PR((FILE *, off_t));
196 extern off_t filesize __PR((FILE *));
197 #endif
198 #ifdef S_IFMT
199 extern int filestat __PR((FILE *, struct stat *));
200 #endif
201 #ifdef FOUND_SIZE_T
202 extern ssize_t filewrite __PR((FILE *, void *, size_t));
203 extern ssize_t ffilewrite __PR((FILE *, void *, size_t));
204 #endif
205 extern int flush __PR((void));
206 extern int fpipe __PR((FILE **));
207 #ifdef __never__
208 extern int fprintf __PR((FILE *, const char *, ...)) __printflike__(2, 3);
209 #endif
210 extern int getbroken __PR((FILE *, char *, char, char **, int));
211 extern int ofindline __PR((FILE *, char, const char *, int,
212 char **, int));
213 extern int peekc __PR((FILE *));
214
215 #ifdef __never_def__
216 /*
217 * We cannot define this or we may get into problems with DOS based systems.
218 */
219 extern int spawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
220 extern int spawnl __PR((FILE *, FILE *, FILE *, const char *, ...));
221 extern int spawnv_nowait __PR((FILE *, FILE *, FILE *,
222 const char *, int, char *const*));
223 #endif /* __never_def__ */
224 #endif /* EOF */
225
226 /*
227 * Flags for absfpath() and resolvefpath():
228 */
229 #define RSPF_EXIST 0x01 /* All path components must exist */
230 #define RSPF_NOFOLLOW_LAST 0x02 /* Don't follow link in last pathcomp */
231
232 #ifdef FOUND_SIZE_T
233 extern char *abspath __PR((const char *relp, char *absp, size_t asize));
234 extern char *absnpath __PR((const char *relp, char *absp, size_t asize));
235 extern char *absfpath __PR((const char *relp, char *absp, size_t asize,
236 int __flags));
237 #ifndef HAVE_RESOLVEPATH
238 extern int resolvepath __PR((const char *__path,
239 char *__buf, size_t __bufsiz));
240 #endif
241 extern int resolvenpath __PR((const char *__path,
242 char *__buf, size_t __bufsiz));
243 extern int resolvefpath __PR((const char *__path,
244 char *__buf, size_t __bufsiz, int __flags));
245 #endif
246
247 #ifdef _SCHILY_TYPES_H
248 extern int mkdirs __PR((char *, mode_t));
249 extern int makedirs __PR((char *, mode_t, int __striplast));
250 #endif
251
252 extern int lxchdir __PR((char *));
253 #ifdef HAVE_FCHDIR
254 #define fdsetname(fd, name) (0)
255 #define fdclosename(fd) (0)
256 #else
257 extern int fdsetname __PR((int fd, const char *name));
258 extern int fdclosename __PR((int fd));
259 #endif
260 extern int diropen __PR((const char *));
261 extern int dirrdopen __PR((const char *));
262 extern int dirclose __PR((int));
263
264 struct save_wd {
265 int fd;
266 char *name;
267 };
268
269 extern int savewd __PR((struct save_wd *sp));
270 extern void closewd __PR((struct save_wd *sp));
271 extern int restorewd __PR((struct save_wd *sp));
272
273
274 #ifdef _SCHILY_UTYPES_H
275 typedef struct gnmult {
276 char key;
277 Llong mult;
278 } gnmult_t;
279
280 extern int getllnum __PR((char *arg, Llong *lvalp));
281 extern int getxnum __PR((char *arg, long *valp, gnmult_t *mult));
282 extern int getllxnum __PR((char *arg, Llong *lvalp, gnmult_t *mult));
283
284 extern int getlltnum __PR((char *arg, Llong *lvalp));
285 extern int getxtnum __PR((char *arg, time_t *valp, gnmult_t *mult));
286 extern int getllxtnum __PR((char *arg, Llong *lvalp, gnmult_t *mult));
287 #endif
288 extern int getnum __PR((char *arg, long *valp));
289 #ifdef _SCHILY_TIME_H
290 extern int gettnum __PR((char *arg, time_t *valp));
291 #endif
292
293 #ifdef _SCHILY_TIME_H
294
295 extern int getnstimeofday __PR((struct timespec *__tp));
296 extern int setnstimeofday __PR((struct timespec *__tp));
297
298 #ifdef _SCHILY_UTYPES_H
299 extern Llong mklgmtime __PR((struct tm *));
300 #endif
301 extern time_t mkgmtime __PR((struct tm *));
302 #endif
303
304
305 #ifdef EOF /* stdio.h has been included */
306 #ifdef _SCHILY_TYPES_H
307 /*
308 * getperm() flags:
309 */
310 #define GP_NOX 0 /* This is not a dir and 'X' is not valid */
311 #define GP_DOX 1 /* 'X' perm character is valid */
312 #define GP_XERR 2 /* 'X' perm characters are invalid */
313 #define GP_FPERM 4 /* TRUE if we implement find -perm */
314 #define GP_UMASK 8 /* TRUE if we implement umask */
315
316 extern int getperm __PR((FILE *f, char *perm, char *opname, \
317 mode_t *modep, int smode, int flag));
318 extern void permtostr __PR((mode_t mode, char *));
319 #endif
320 #endif
321
322 #ifdef FOUND_SIZE_T
323 extern ssize_t _niread __PR((int, void *, size_t));
324 extern ssize_t _niwrite __PR((int, void *, size_t));
325 extern ssize_t _nixread __PR((int, void *, size_t));
326 extern ssize_t _nixwrite __PR((int, void *, size_t));
327 #endif
328 extern int _openfd __PR((const char *, int));
329 extern int on_comerr __PR((void (*fun)(int, void *), void *arg));
330 /*PRINTFLIKE1*/
331 extern void comerr __PR((const char *, ...)) __printflike__(1, 2);
332 /*PRINTFLIKE2*/
333 extern void xcomerr __PR((int, const char *, ...)) __printflike__(2, 3);
334 /*PRINTFLIKE2*/
335 extern void comerrno __PR((int, const char *, ...)) __printflike__(2, 3);
336 /*PRINTFLIKE3*/
337 extern void xcomerrno __PR((int, int, const char *, ...)) __printflike__(3, 4);
338 /*PRINTFLIKE1*/
339 extern int errmsg __PR((const char *, ...)) __printflike__(1, 2);
340 /*PRINTFLIKE2*/
341 extern int errmsgno __PR((int, const char *, ...)) __printflike__(2, 3);
342 #ifdef FOUND_SIZE_T
343 /*PRINTFLIKE3*/
344 extern int serrmsg __PR((char *, size_t, const char *, ...))
345 __printflike__(3, 4);
346 /*PRINTFLIKE4*/
347 extern int serrmsgno __PR((int, char *, size_t, const char *, ...))
348 __printflike__(4, 5);
349 #endif
350 extern void comexit __PR((int));
351 extern char *errmsgstr __PR((int));
352
353 #ifdef EOF /* stdio.h has been included */
354 /*PRINTFLIKE2*/
355 extern void fcomerr __PR((FILE *, const char *, ...))
356 __printflike__(2, 3);
357 /*PRINTFLIKE3*/
358 extern void fxcomerr __PR((FILE *, int, const char *, ...))
359 __printflike__(3, 4);
360 /*PRINTFLIKE3*/
361 extern void fcomerrno __PR((FILE *, int, const char *, ...))
362 __printflike__(3, 4);
363 /*PRINTFLIKE4*/
364 extern void fxcomerrno __PR((FILE *, int, int, const char *, ...))
365 __printflike__(4, 5);
366 /*PRINTFLIKE2*/
367 extern int ferrmsg __PR((FILE *, const char *, ...))
368 __printflike__(2, 3);
369 /*PRINTFLIKE3*/
370 extern int ferrmsgno __PR((FILE *, int, const char *, ...))
371 __printflike__(3, 4);
372 #ifdef _SCHILY_VARARGS_H
373 #define COMERR_RETURN 0
374 #define COMERR_EXIT 1
375 #define COMERR_EXCODE 2
376 /*PRINTFLIKE5*/
377 extern int _comerr __PR((FILE *, int, int, int,
378 const char *, va_list));
379 #endif
380 #endif
381
382 /*PRINTFLIKE1*/
383 extern int error __PR((const char *, ...)) __printflike__(1, 2);
384 #ifdef FOUND_SIZE_T
385 extern char *fillbytes __PR((void *, ssize_t, char));
386 extern char *zerobytes __PR((void *, ssize_t));
387 extern char *findbytes __PR((const void *, ssize_t, char));
388 #endif
389 extern char *findinpath __PR((char *__name, int __mode,
390 BOOL __plain_file, char *__path));
391 extern int findline __PR((const char *, char, const char *,
392 int, char **, int));
393 extern int js_getline __PR((char *, int));
394 extern int getstr __PR((char *, int));
395 extern int breakline __PR((char *, char, char **, int));
396 extern int getallargs __PR((int *, char * const**, const char *, ...));
397 extern int getargs __PR((int *, char * const**, const char *, ...));
398 extern int getfiles __PR((int *, char * const**, const char *));
399 extern char *astoi __PR((const char *, int *));
400 extern char *astol __PR((const char *, long *));
401 extern char *astolb __PR((const char *, long *, int base));
402 #ifdef _SCHILY_UTYPES_H
403 extern char *astoll __PR((const char *, Llong *));
404 extern char *astollb __PR((const char *, Llong *, int));
405 extern char *astoull __PR((const char *, Ullong *));
406 extern char *astoullb __PR((const char *, Ullong *, int));
407 #endif
408
409 extern int patcompile __PR((const unsigned char *, int, int *));
410 extern unsigned char *patmatch __PR((const unsigned char *, const int *,
411 const unsigned char *,
412 int, int, int, int[]));
413 extern unsigned char *patlmatch __PR((const unsigned char *, const int *,
414 const unsigned char *,
415 int, int, int, int[]));
416
417 #ifdef __never__
418 extern int printf __PR((const char *, ...)) __printflike__(1, 2);
419 #endif
420 #ifdef FOUND_SIZE_T
421 extern char *movebytes __PR((const void *, void *, ssize_t));
422 extern char *movecbytes __PR((const void *, void *, int, size_t));
423 #endif
424
425 extern void save_args __PR((int, char **));
426 extern int saved_ac __PR((void));
427 extern char **saved_av __PR((void));
428 extern char *saved_av0 __PR((void));
429 extern char *searchfileinpath __PR((char *__name, int __mode,
430 int __file_mode, char *__path));
431 #define SIP_ANY_FILE 0x00 /* Search for any file type */
432 #define SIP_PLAIN_FILE 0x01 /* Search for plain files - not dirs */
433 #define SIP_NO_PATH 0x10 /* Do not do PATH search */
434 #define SIP_ONLY_PATH 0x20 /* Do only PATH search */
435 #define SIP_NO_STRIPBIN 0x40 /* Do not strip "/bin" from PATH elem. */
436 #define SIP_TYPE_MASK 0x0F /* Mask file type related bits */
437
438 #ifndef seterrno
439 extern int seterrno __PR((int));
440 #endif
441 extern void set_progname __PR((const char *));
442 extern char *get_progname __PR((void));
443 extern char *get_progpath __PR((void));
444 extern char *getexecpath __PR((void));
445
446 extern void setfp __PR((void * const *));
447 extern int wait_chld __PR((int)); /* for fspawnv_nowait() */
448 extern int geterrno __PR((void));
449 extern void raisecond __PR((const char *, long));
450 #ifdef __never__
451 /*
452 * sprintf() may be declared incorrectly somewhere else
453 * e.g. in old BSD include files
454 */
455 extern int sprintf __PR((char *, const char *, ...));
456 #endif
457 extern char *strcatl __PR((char *, ...));
458 #ifdef FOUND_SIZE_T
459 extern size_t strlcatl __PR((char *, size_t, ...));
460 #endif
461 extern int streql __PR((const char *, const char *));
462 #ifdef _SCHILY_WCHAR_H
463 extern wchar_t *wcscatl __PR((wchar_t *, ...));
464 #ifdef FOUND_SIZE_T
465 extern size_t wcslcatl __PR((wchar_t *, size_t, ...));
466 #endif
467 extern int wcseql __PR((const wchar_t *, const wchar_t *));
468 #endif
469 #ifdef va_arg
470 extern int format __PR((void (*)(char, intptr_t), intptr_t, const char *,
471 va_list));
472 extern int fprformat __PR((intptr_t, const char *, va_list));
473 #else
474 extern int format __PR((void (*)(char, intptr_t), intptr_t, const char *, void *));
475 extern int fprformat __PR((intptr_t, const char *, void *));
476 #endif
477
478 extern int ftoes __PR((char *, double, int, int));
479 extern int ftofs __PR((char *, double, int, int));
480 #ifdef HAVE_LONGDOUBLE
481 extern int qftoes __PR((char *, long double, int, int));
482 extern int qftofs __PR((char *, long double, int, int));
483 #endif
484
485 /*PRINTFLIKE1*/
486 extern int js_error __PR((const char *, ...)) __printflike__(1, 2);
487 /*PRINTFLIKE2*/
488 extern int js_dprintf __PR((int, const char *, ...))
489 __printflike__(2, 3);
490 #ifdef EOF /* stdio.h has been included */
491 /*PRINTFLIKE2*/
492 extern int js_fprintf __PR((FILE *, const char *, ...))
493 __printflike__(2, 3);
494 #endif /* EOF */
495 /*PRINTFLIKE1*/
496 extern int js_printf __PR((const char *, ...)) __printflike__(1, 2);
497 #ifdef FOUND_SIZE_T
498 /*PRINTFLIKE3*/
499 extern int js_snprintf __PR((char *, size_t, const char *, ...))
500 __printflike__(3, 4);
501 #endif
502 /*PRINTFLIKE2*/
503 extern int js_sprintf __PR((char *, const char *, ...))
504 __printflike__(2, 3);
505
506 #ifdef FOUND_SIZE_T
507 extern void swabbytes __PR((void *, ssize_t));
508 #endif
509 extern char **getmainfp __PR((void));
510 extern char **getavp __PR((void));
511 extern char *getav0 __PR((void));
512 extern void **getfp __PR((void));
513 extern int flush_reg_windows __PR((int));
514 #ifdef FOUND_SIZE_T
515 extern ssize_t cmpbytes __PR((const void *, const void *, ssize_t));
516 extern int cmpmbytes __PR((const void *, const void *, ssize_t));
517 extern ssize_t cmpnullbytes __PR((const void *, ssize_t));
518 #endif
519
520 #ifdef nonono
521 #if defined(HAVE_LARGEFILES)
522 /*
523 * To allow this, we need to figure out how to do autoconfiguration for off64_t
524 */
525 extern FILE *_fcons64 __PR((FILE *, int, int));
526 extern FILE *fdup64 __PR((FILE *));
527 extern FILE *fileluopen64 __PR((int, const char *));
528 extern FILE *fileopen64 __PR((const char *, const char *));
529 #ifdef FOUND_OFF_T
530 extern off64_t filepos64 __PR((FILE *));
531 #endif
532 extern FILE *filereopen64 __PR((const char *, const char *, FILE *));
533 #ifdef FOUND_OFF_T
534 extern int fileseek64 __PR((FILE *, off64_t));
535 extern off64_t filesize64 __PR((FILE *));
536 #endif
537 #ifdef S_IFMT
538 extern int filestat64 __PR((FILE *, struct stat *));
539 #endif
540 extern int _openfd64 __PR((const char *, int));
541 #endif
542 #endif
543
544 #ifndef NO_SCHILY_PRINT /* Define to disable *printf() redirects */
545 #ifdef SCHILY_PRINT
546 #ifdef __never__
547 #undef error
548 #define error js_error
549 #endif /* __never__ */
550 #undef dprintf
551 #define dprintf js_dprintf
552 #undef fprintf
553 #define fprintf js_fprintf
554 #undef printf
555 #define printf js_printf
556 #undef snprintf
557 #define snprintf js_snprintf
558 #undef sprintf
559 #define sprintf js_sprintf
560 #else
561 #ifndef HAVE_SNPRINTF
562 #undef snprintf
563 #define snprintf js_snprintf
564 #endif /* HAVE_SNPRINTF */
565 #endif /* SCHILY_PRINT */
566 #endif /* NO_SCHILY_PRINT */
567
568 #ifndef NO_SCHILY_GETLINE /* Define to disable *getline() redirect */
569 #undef getline
570 #define getline js_getline
571 #undef fgetline
572 #define fgetline js_fgetline
573 #endif
574
575 #ifndef NO_SCHILY_FEXEC /* Define to disable fexec*() redirect */
576 #undef fexecl
577 #define fexecl js_fexecl
578 #undef fexecle
579 #define fexecle js_fexecle
580 #undef fexecv
581 #define fexecv js_fexecv
582 #undef fexecve
583 #define fexecve js_fexecve
584 #endif
585
586 #ifndef NO_SCHILY_FSPAWN /* Define to disable fspawn*() redirect */
587 #undef fspawnv
588 #define fspawnv js_fspawnv
589 #undef fspawnv_nowait
590 #define fspawnv_nowait js_fspawnv_nowait
591 #undef fspawnl
592 #define fspawnl js_fspawnl
593 #endif
594
595 extern int js_mexval __PR((int exval));
596 #ifdef FOUND_SIZE_T
597 extern void *js_malloc __PR((size_t size, char *msg));
598 extern void *js_realloc __PR((void *ptr, size_t size, char *msg));
599 #endif
600 extern char *js_savestr __PR((const char *s));
601
602 #ifdef _SCHILY_JMPDEFS_H
603
604 /*
605 * Special values for the "jmp" parameter.
606 *
607 * Control how the siglongjmp() should be handled:
608 */
609 #define JM_EXIT ((sigjmps_t *)-1) /* Call comexit(errno) instead */
610 #define JM_RETURN ((sigjmps_t *)0) /* Return instead */
611
612 extern int js_jmexval __PR((int exval));
613 #ifdef FOUND_SIZE_T
614 extern void *js_jmalloc __PR((size_t size, char *msg, sigjmps_t *jmp));
615 extern void *js_jrealloc __PR((void *ptr, size_t size, char *msg,
616 sigjmps_t *jmp));
617 #endif
618 extern char *js_jsavestr __PR((const char *s, sigjmps_t *jmp));
619
620 extern int js_fjmexval __PR((int exval));
621 #ifdef EOF /* stdio.h has been included */
622 #ifdef FOUND_SIZE_T
623 extern void *js_fjmalloc __PR((FILE *f, size_t size, char *msg,
624 sigjmps_t *jmp));
625 extern void *js_fjrealloc __PR((FILE *f, void *ptr, size_t size,
626 char *msg, sigjmps_t *jmp));
627 #endif
628 extern char *js_fjsavestr __PR((FILE *f, const char *s, sigjmps_t *jmp));
629 #endif /* EOF */
630 #endif /* _SCHILY_JMPDEFS_H */
631
632 #define ___mexval js_mexval
633 #define ___malloc js_malloc
634 #define ___realloc js_realloc
635 #define ___savestr js_savestr
636 #define __jmexval js_jmexval
637 #define __jmalloc js_jmalloc
638 #define __jrealloc js_jrealloc
639 #define __jsavestr js_jsavestr
640 #define __fjmalloc js_fjmalloc
641 #define __fjmexval js_fjmexval
642 #define __fjrealloc js_fjrealloc
643 #define __fjsavestr js_fjsavestr
644
645 #ifdef __cplusplus
646 }
647 #endif
648
649 #if defined(_JOS) || defined(JOS)
650 # ifndef _SCHILY_JOS_IO_H
651 # include <schily/jos_io.h>
652 # endif
653 #endif
654
655 #if !defined(_SCHILY_LIBPORT_H) && !defined(NO_LIBPORT_H)
656 #include <schily/libport.h>
657 #endif
658 #if !defined(_SCHILY_HOSTNAME_H) && defined(USE_HOSTNAME_H)
659 #include <schily/hostname.h>
660 #endif
661
662 #endif /* _SCHILY_SCHILY_H */