summaryrefslogtreecommitdiff
path: root/proto.h
blob: 6432bc9a1280b32e4466ad075610fe127a69a3c4 (plain)
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
#if HAVE_QUAD_T
typedef quad_t align_t;
#else
typedef long align_t;
#endif

/* If you need to change this, please let the maintainer know. */
#ifndef SIG_ATOMIC_T
typedef int SIG_ATOMIC_T;
#endif

#if STDC_HEADERS

#include <string.h>
#include <stdlib.h>

#else /* STDC_HEADERS */

/* fake string.h */
extern int strncmp(const char *, const char *, size_t);
extern int strcmp(const char *, const char *);
extern size_t strlen(const char *);
extern char *strchr(const char *, int);
extern char *strrchr(const char *, int);
extern char *strcpy(char *, const char *);
extern char *strncpy(char *, const char *, size_t);
extern char *strcat(char *, const char *);
extern char *strncat(char *, const char *, size_t);
extern void *memcpy(void *, const void *, size_t);
extern void *memset(void *, int, size_t);

/* fake stdlib.h */
extern void exit(int);
extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));

#endif /* STDC_HEADERS */

/* fake errno.h for mips (which doesn't declare errno in errno.h!?!?) */
#ifdef host_mips
extern int errno;
#endif