error() function is glibc-specific, make own implementation

This commit is contained in:
Alexander Zubkov
2021-12-12 17:45:39 +01:00
parent 01f6592f49
commit 507f4e664d
4 changed files with 29 additions and 7 deletions

6
lib.h
View File

@@ -20,4 +20,10 @@ void ip62bits(char *s, bits b, mask_t *m);
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
extern const char *program_invocation_name;
#define init_err() { program_invocation_name = argv[0]; }
void error(int status, int errnum, const char *fmt, ...);
#endif /* !LIB_H */