ereport.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /** BEGIN COPYRIGHT BLOCK
  2. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  3. * Copyright (C) 2005 Red Hat, Inc.
  4. * All rights reserved.
  5. *
  6. * License: GPL (version 3 or any later version).
  7. * See LICENSE for details.
  8. * END COPYRIGHT BLOCK **/
  9. #ifdef HAVE_CONFIG_H
  10. # include <config.h>
  11. #endif
  12. #ifndef BASE_EREPORT_H
  13. #define BASE_EREPORT_H
  14. #ifndef NOINTNSAPI
  15. #define INTNSAPI
  16. #endif /* !NOINTNSAPI */
  17. /*
  18. * ereport.h: Records transactions, reports errors to administrators, etc.
  19. *
  20. * Rob McCool
  21. */
  22. /* --- Begin function prototypes --- */
  23. #ifdef INTNSAPI
  24. NSPR_BEGIN_EXTERN_C
  25. /*
  26. * INTereport logs an error of the given degree and formats the arguments with
  27. * the printf() style fmt. Returns whether the log was successful. Records
  28. * the current date.
  29. */
  30. NSAPI_PUBLIC int INTereport(int degree, char *fmt, ...)
  31. #ifdef __GNUC__
  32. __attribute__ ((format (printf, 2, 3)));
  33. #else
  34. ;
  35. #endif
  36. NSAPI_PUBLIC int INTereport_v(int degree, char *fmt, va_list args);
  37. NSPR_END_EXTERN_C
  38. /* --- End function prototypes --- */
  39. #define ereport INTereport
  40. #define ereport_v INTereport_v
  41. #endif /* INTNSAPI */
  42. #endif /* !BASE_EREPORT_H */