Make compile_et output usable out-of-tree
[openafs.git] / src / comerr / com_err.h
1 /*
2  * Header file for common error description library.
3  *
4  * Copyright 1988, Student Information Processing Board of the
5  * Massachusetts Institute of Technology.
6  *
7  * For copyright and distribution info, see the documentation supplied
8  * with this package.
9  */
10
11 #ifndef __AFS_COM_ERR_H
12
13 #include <stdarg.h>
14
15 extern void afs_com_err(const char *, afs_int32, const char *, ...)
16     AFS_ATTRIBUTE_FORMAT(__printf__, 3, 4);
17
18 extern void afs_com_err_va(const char *whoami, afs_int32 code, const char *fmt,
19                        va_list args)
20     AFS_ATTRIBUTE_FORMAT(__printf__, 3, 0);
21
22 extern const char *afs_error_table_name(int);
23 extern const char *afs_error_message(afs_int32);
24 extern const char *afs_error_message_localize(afs_int32 code, char *str, size_t len);
25 extern
26 void (*afs_set_com_err_hook
27       (void (*)(const char *, afs_int32, const char *, va_list)))
28   (const char *, afs_int32, const char *, va_list);
29 extern void (*afs_reset_com_err_hook(void)) (const char *, afs_int32,
30                                          const char *, va_list);
31
32 #define __AFS_COM_ERR_H
33 #ifdef AFS_OLD_COM_ERR
34 #define com_err                 afs_com_err
35 #define com_err_va              afs_com_err_va
36 #define error_table_name        afs_error_table_name
37 #define error_message           afs_error_message
38 #define set_com_err_hook        afs_set_com_err_hook
39 #define reset_com_err_hook      afs_reset_com_err_hook
40 #endif /* AFS_OLD_COM_ERR */
41 #endif /* ! defined(__AFS_COM_ERR_H) */