home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / id-utils-3.2-src.tgz / tar.out / fsf / id-utils / lib / error.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  2KB  |  50 lines

  1. /* error.h -- declaration for error-reporting function
  2.    Copyright (C) 1995 Free Software Foundation, Inc.
  3.  
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 2, or (at your option)
  7.    any later version.
  8.  
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  17.  
  18. #ifndef _error_h_
  19. #define _error_h_
  20.  
  21. #include <errno.h>
  22. #ifndef errno
  23. extern int errno;
  24. #endif
  25.  
  26. #ifndef __attribute__
  27. /* This feature is available in gcc versions 2.5 and later.  */
  28. # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
  29. #  define __attribute__(Spec) /* empty */
  30. # endif
  31. /* The __-protected variants of `format' and `printf' attributes
  32.    are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
  33. # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
  34. #  define __format__ format
  35. #  define __printf__ printf
  36. # endif
  37. #endif
  38.  
  39. #if __STDC__
  40. void error (int, int, const char *, ...) \
  41.   __attribute__ ((__format__ (__printf__, 3, 4)));
  42. #else
  43. void error ();
  44. #endif
  45.  
  46. /* This variable is incremented each time `error' is called.  */
  47. extern unsigned int error_message_count;
  48.  
  49. #endif /* _error_h_ */
  50.