diff options
Diffstat (limited to 'contrib/cvs/src/error.h')
-rw-r--r-- | contrib/cvs/src/error.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/contrib/cvs/src/error.h b/contrib/cvs/src/error.h index 7d4f535..e0fde4a 100644 --- a/contrib/cvs/src/error.h +++ b/contrib/cvs/src/error.h @@ -9,15 +9,21 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifndef _error_h_ #define _error_h_ +/* Add prototype support. Normally this is done in cvs.h, but that + doesn't get included from lib/savecwd.c. */ +#ifndef PROTO +#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) +#define PROTO(ARGS) ARGS +#else +#define PROTO(ARGS) () +#endif +#endif + #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ @@ -31,13 +37,17 @@ # endif #endif -#if __STDC__ +#ifdef __STDC__ void error (int, int, const char *, ...) \ __attribute__ ((__format__ (__printf__, 3, 4))); #else void error (); #endif +/* Exit due to an error. Similar to error (1, 0, "message"), but call + it in the case where the message has already been printed. */ +extern void error_exit PROTO ((void)); + /* If non-zero, error will use the CVS protocol to report error messages. This will only be set in the CVS server parent process; most other code is run via do_cvs_command, which forks off a child |