nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1#include <getopt.h>
2extern int optopt;
3
4int ftruncate(int fd, int offset) {
5 return -1;
6}
7
8int getsid (int pid) {
9 return -1;
10}
11
12static int isblank(int c)
13{
14 return c == ' ' || c == '\t';
15}
16
17#define lchown chown
18
19// meslibc implements lstat but is missing declaration
20#include <sys/stat.h>
21int lstat (char const *file_name, struct stat *statbuf);
22
23#include <fcntl.h>
24int mkstemp(char *t)
25{
26 mktemp(t);
27 int fd = open(t, O_CREAT|O_RDWR|O_TRUNC, 0600);
28 return fd;
29}
30
31int putenv(char *string)
32{
33 return 0;
34}
35
36char* realpath (char* path, char* resolved) {
37 return NULL;
38}
39
40#define strncasecmp(a,b,n) strncmp(strupr(a),strupr(b),n)
41
42
43#define nlink_t unsigned long
44
45#include <limits.h>
46#define USHRT_MAX UINT16_MAX
47#define SSIZE_MAX LONG_MAX
48#define MB_LEN_MAX 1
49
50#define EPERM 1
51#define ESRCH 3
52#define EDOM 33
53#define S_IFSOCK 0140000
54#define S_ISVTX 01000
55#define S_IREAD S_IRUSR
56#define S_IWRITE S_IWUSR
57#define S_IEXEC S_IXUSR
58
59#define _PC_PATH_MAX PATH_MAX
60#define _PC_VDISABLE 8
61#define _POSIX_PATH_MAX PATH_MAX
62#define LINE_MAX 4096
63
64#define LC_TIME 0