File: missing.h

package info (click to toggle)
twin 0.4.0-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,804 kB
  • ctags: 23,904
  • sloc: ansic: 61,860; cpp: 1,023; makefile: 777; sh: 552; lex: 302; yacc: 231
file content (54 lines) | stat: -rw-r--r-- 1,270 bytes parent folder | download | duplicates (2)
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

#ifndef _TWIN_MISSING_H
#define _TWIN_MISSING_H

#include "Tw/prefix.h"

#ifndef TW_RETSIGTYPE
# include "Tw/Twautoconf.h"
#endif

#ifndef TW_HAVE_MEMCMP
int Tw_missing_memcmp(TW(CONST) void *s1, TW(CONST) void *s2, size_t n);
# define memcmp Tw_missing_memcmp
#endif

#ifdef TW_SETVBUF_REVERSED
# define setvbuf(stream, buf, mode, size) setvbuf(stream, mode, buf, size)
#endif

#ifndef TW_HAVE_STRDUP
char *Tw_missing_strdup(TW(CONST) char *s, void *(*missing_malloc)(size_t size));
# define strdup(s) Tw_missing_strdup((s), Tw(AllocMem))
#endif

#ifndef TW_HAVE_STRERROR
# define strerror(errnum) ""
#endif

#ifndef TW_HAVE_HSTRERROR
# define hstrerror(herrnum) ""
#endif

#ifndef TW_HAVE_STRSPN
size_t Tw_missing_strspn(TW(CONST) char *s, TW(CONST) char *accept);
# define strspn(s, accept) Tw_missing_strspn(s, accept)
#endif

#ifndef TW_HAVE_STRSTR
TW(CONST) char *Tw_missing_strstr(TW(CONST) char *haystack, TW(CONST) char *needle);
# define strstr(haystack, needle) Tw_missing_strstr(haystack, needle)
#endif

#ifndef TW_HAVE_WAIT3
# ifdef TW_HAVE_WAIT4
#  define wait3(status, options, rusage) wait4(-1, status, options, rusage)
# else
#  define wait3(status, options, rusage) ((pid_t)-1)
# endif
#endif

#include "Tw/unprefix.h"

#endif /* _TWIN_MISSING_H */