Convert usages of errx to h_platform_errx
This BSD call will have to be implemented on windows. Right now we have a stub that just exits the process.
This commit is contained in:
parent
c8726244ae
commit
0c35525e30
10 changed files with 63 additions and 12 deletions
18
src/platform.h
Normal file
18
src/platform.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef HAMMER_PLATFORM__H
|
||||
#define HAMMER_PLATFORM__H
|
||||
|
||||
/**
|
||||
* @file interface between hammer and the operating system /
|
||||
* underlying platform.
|
||||
*/
|
||||
|
||||
#include "compiler_specifics.h"
|
||||
|
||||
/* Error Reporting */
|
||||
|
||||
/* BSD errx function, seen in err.h */
|
||||
H_MSVC_DECLSPEC(noreturn) \
|
||||
void h_platform_errx(int err, const char* format, ...) \
|
||||
H_GCC_ATTRIBUTE((noreturn, format (printf,2,3)));
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue