Object.m (errno): Replaced by errno.h include.
2008-11-21 Kai Tietz <kai.tietz@onevision.com> * Object.m (errno): Replaced by errno.h include. (compare): Cast self to id to prevent warning on comparison. * objc/objc.h (BOOL): Prevent redeclaration of BOOL, if it is already there. * sendmsg.c (__objc_print_dtable_stats): Remove type warnings. * thr-win32.c (__objc_thread_detach): Remove type warning. (__objc_thread_id): Likewise. * thr.c (__objc_thread_detach_functiont): Add __builtin_trap () for noreturn. From-SVN: r142087
This commit is contained in:
parent
6b96ae3a28
commit
b15b7ef84d
@ -1,3 +1,15 @@
|
||||
2008-11-21 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
* Object.m (errno): Replaced by errno.h include.
|
||||
(compare): Cast self to id to prevent warning on comparison.
|
||||
* objc/objc.h (BOOL): Prevent redeclaration of BOOL, if it is
|
||||
already there.
|
||||
* sendmsg.c (__objc_print_dtable_stats): Remove type warnings.
|
||||
* thr-win32.c (__objc_thread_detach): Remove type warning.
|
||||
(__objc_thread_id): Likewise.
|
||||
* thr.c (__objc_thread_detach_functiont): Add __builtin_trap ()
|
||||
for noreturn.
|
||||
|
||||
2008-09-26 Peter O'Gorman <pogma@thewrittenword.com>
|
||||
Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
|
@ -25,12 +25,11 @@ Boston, MA 02110-1301, USA. */
|
||||
executable file might be covered by the GNU General Public License. */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include "objc/Object.h"
|
||||
#include "objc/Protocol.h"
|
||||
#include "objc/objc-api.h"
|
||||
|
||||
extern int errno;
|
||||
|
||||
#define MAX_CLASS_NAME_LEN 256
|
||||
|
||||
@implementation Object
|
||||
@ -121,7 +120,7 @@ extern int errno;
|
||||
return 0;
|
||||
// Ordering objects by their address is pretty useless,
|
||||
// so subclasses should override this is some useful way.
|
||||
else if (self > anotherObject)
|
||||
else if ((id)self > anotherObject)
|
||||
return 1;
|
||||
else
|
||||
return -1;
|
||||
|
@ -39,6 +39,7 @@ extern "C" {
|
||||
#ifdef __vxworks
|
||||
typedef int BOOL;
|
||||
#else
|
||||
#undef BOOL
|
||||
typedef unsigned char BOOL;
|
||||
#endif
|
||||
#define YES (BOOL)1
|
||||
|
@ -687,14 +687,14 @@ __objc_print_dtable_stats ()
|
||||
#endif
|
||||
|
||||
printf ("arrays: %d = %ld bytes\n", narrays,
|
||||
(long) (narrays * sizeof (struct sarray)));
|
||||
(long) ((size_t) narrays * sizeof (struct sarray)));
|
||||
total += narrays * sizeof (struct sarray);
|
||||
printf ("buckets: %d = %ld bytes\n", nbuckets,
|
||||
(long) (nbuckets * sizeof (struct sbucket)));
|
||||
(long) ((size_t) nbuckets * sizeof (struct sbucket)));
|
||||
total += nbuckets * sizeof (struct sbucket);
|
||||
|
||||
printf ("idxtables: %d = %ld bytes\n",
|
||||
idxsize, (long) (idxsize * sizeof (void *)));
|
||||
idxsize, (long) ((size_t) idxsize * sizeof (void *)));
|
||||
total += idxsize * sizeof (void *);
|
||||
printf ("-----------------------------------\n");
|
||||
printf ("total: %d bytes\n", total);
|
||||
|
@ -70,7 +70,7 @@ __objc_thread_detach(void (*func)(void *arg), void *arg)
|
||||
arg, 0, &thread_id)))
|
||||
thread_id = 0;
|
||||
|
||||
return (objc_thread_t)thread_id;
|
||||
return (objc_thread_t)(size_t) thread_id;
|
||||
}
|
||||
|
||||
/* Set the current thread's priority. */
|
||||
@ -151,7 +151,7 @@ __objc_thread_exit(void)
|
||||
objc_thread_t
|
||||
__objc_thread_id(void)
|
||||
{
|
||||
return (objc_thread_t)GetCurrentThreadId();
|
||||
return (objc_thread_t)(size_t) GetCurrentThreadId();
|
||||
}
|
||||
|
||||
/* Sets the thread's local storage pointer. */
|
||||
|
@ -114,6 +114,9 @@ __objc_thread_detach_function (struct __objc_thread_start_state *istate)
|
||||
|
||||
/* Exit the thread */
|
||||
objc_thread_exit ();
|
||||
|
||||
/* Make sure compiler detects no return. */
|
||||
__builtin_trap ();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user