-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathportable.h
51 lines (40 loc) · 953 Bytes
/
portable.h
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
/*
* This file is was written by Brian Callahan <bcallah@devio.us>
* and released into the Public Domain.
*/
#include <stdio.h>
#include "ohash.h"
#ifdef NEED_ASPRINTF
int asprintf(char **, const char *, ...);
#endif
#ifdef NEED_FGETLN
char *fgetln(FILE *, size_t *);
#endif
#ifdef NEED_REALLOCARRAY
void *reallocarray(void *, size_t, size_t);
#endif
#ifdef NEED_STRLCPY
size_t strlcpy(char *, const char *, size_t);
#endif
#ifdef NEED_STRTONUM
long long strtonum(const char *, long long, long long, const char **);
#endif
#ifdef NEED_PROGNAME
char *__progname;
#endif
#ifndef _NSIG
#define _NSIG 33
#endif
#ifdef NEED_SYS_SIGNAME
extern const char *const sys_signame[];
#endif
#ifndef SIGINFO
#define SIGINFO 29
#endif
/* From OpenBSD sys/time.h */
#ifndef timespeccmp
#define timespeccmp(tsp, usp, cmp) \
(((tsp)->tv_sec == (usp)->tv_sec) ? \
((tsp)->tv_nsec cmp (usp)->tv_nsec) : \
((tsp)->tv_sec cmp (usp)->tv_sec))
#endif