1 /* SPDX-License-Identifier: GPL-2.0-only */
21 #define BUG() assert(0)
23 #define COMMON_RESULT_START 0x10000
24 #define LAYOUT_RESULT_START 0x20000
25 #define CMOS_RESULT_START 0x30000
26 #define CMOS_OP_RESULT_START 0x40000
28 #define OK 0 /* 0 is used universally to indicate success. */
30 #define LINE_EOF (COMMON_RESULT_START + 0)
31 #define LINE_TOO_LONG (COMMON_RESULT_START + 1)
38 void *win32_mmap(void *start
, size_t length
, int prot
, int flags
, int fd
, off_t offset
);
39 int win32_munmap(void *start
, size_t length
);
41 #define mmap win32_mmap
42 #define munmap win32_munmap
44 #define MAP_FAILED ((void *)-1)
48 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
49 #define noreturn _Noreturn
54 /* basename of this program, as reported by argv[0] */
55 extern const char prog_name
[];
57 /* version of this program */
58 extern const char prog_version
[];
60 int get_line_from_file(FILE * f
, char line
[], int line_buf_size
);
61 noreturn
void out_of_memory(void);
62 void usage(FILE * outfile
);