From 7b8699866416f7a55116e19bf6fe2c28bae12a68 Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Sun, 12 Sep 2010 00:43:15 +0000 Subject: In libobjc/: * objc/deprecated/objc_error.h: New file. * objc/objc-api.h: Include deprecated/objc_error.h instead of defining objc_error and related. * error.c: New file. Added _objc_abort function which replaces objc_error. No change in functionality as they both print an error and abort. * misc.c: File removed. Code moved into memory.c and error.c. * memory.c: New file. * objc-private/error.h: New file. * archive.c: Include objc-private/error.h and use _objc_abort instead of objc_error everywhere. * class.c: Same change. * encoding.c: Same change. * init.c: Same change, and simplified init_check_module_version. * memory.c: Same change. * sendmsg.c: Same change. * thr.c: Same change. * Makefile.in (OBJ_DEPRECATED_H): Added objc_error.h. (OBJ_H): Reordered list. (OBJS): Removed misc.lo, added memory.lo and error.lo. (OBJS_GC): Removed misc_gc.lo, added memory_gc.lo and error_gc.lo. (misc_gc.lo): Rule removed. (error_gc.lo): Rule added. (memory_gc.lo): Rule added. From-SVN: r164223 --- libobjc/objc-private/error.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 libobjc/objc-private/error.h (limited to 'libobjc/objc-private') diff --git a/libobjc/objc-private/error.h b/libobjc/objc-private/error.h new file mode 100644 index 0000000..2df9cb7 --- /dev/null +++ b/libobjc/objc-private/error.h @@ -0,0 +1,37 @@ +/* GNU Objective C Runtime Common Private Definitions + Copyright (C) 2010 Free Software Foundation, Inc. + Contributed by Nicola Pero + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under the +terms of the GNU General Public License as published by the Free Software +Foundation; either version 3, or (at your option) any later version. + +GCC 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. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifndef __objc_private_error_INCLUDE_GNU +#define __objc_private_error_INCLUDE_GNU + +/* Prints an unrecoverable error to stderr, then aborts the program. + This should only be used for errors that really are unrecorevable: + failure to allocate memory, and failure to load an Objective-C + module. All other usages of this function should be converted into + some milder type of error. +*/ +void +_objc_abort (const char *fmt, ...); + +#endif /* __objc_private_error_INCLUDE_GNU */ -- cgit v1.1