47 lines
856 B
C
47 lines
856 B
C
#ifndef CBDUTIL_H
|
|
#define CBDUTIL_H
|
|
|
|
/*
|
|
* Platform specific macros that affect system headers
|
|
*/
|
|
#ifdef linux
|
|
#ifndef _LARGEFILE64_SOURCE
|
|
#define _LARGEFILE64_SOURCE
|
|
#endif
|
|
#endif
|
|
|
|
/*
|
|
* Include and define all the basic things that would normally be
|
|
* expected to be available on the current platform.
|
|
*/
|
|
|
|
#include <ctype.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <stdarg.h>
|
|
#include <string.h>
|
|
#include <limits.h>
|
|
#include <errno.h>
|
|
#include <assert.h>
|
|
#include <time.h>
|
|
|
|
#include <inttypes.h>
|
|
#include <stdbool.h>
|
|
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
#include <unistd.h>
|
|
|
|
extern uint verbose_level;
|
|
|
|
void __attribute__((noreturn))
|
|
error(const char* fmt, ...);
|
|
int verbose(uint level, const char* fmt, ...);
|
|
|
|
bool ask_user_bool(const char* fmt, ...);
|
|
|
|
#endif
|