Applied patch #6668

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/libobjc/trunk@27082 72102866-910b-0410-8b05-ffd578937521
main
rfm 17 years ago
parent 71a4660feb
commit 39bd9da975

@ -1,3 +1,14 @@
2008-11-07 Roland Schwingel <roland.schwingel@onevision.de>
* sendmsg.c:
* thr-win32.c:
* thr.c:
* Object.m:
* archive.c:
* objc/objc.h:
* objc/objc-decls.h:
Cleanups for 64bit mswindows support.
2008-09-01 17:06-EDT Gregory John Casamento <greg_casamento@yahoo.com> 2008-09-01 17:06-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* config/x86_64/linux-gnu/tconfig.h: Add x86_64 config file. * config/x86_64/linux-gnu/tconfig.h: Add x86_64 config file.

@ -29,7 +29,11 @@ Boston, MA 02110-1301, USA. */
#include "objc/Protocol.h" #include "objc/Protocol.h"
#include "objc/objc-api.h" #include "objc/objc-api.h"
extern int errno; extern
#ifdef _WIN32
__declspec(dllimport)
#endif
int errno;
#define MAX_CLASS_NAME_LEN 256 #define MAX_CLASS_NAME_LEN 256
@ -115,13 +119,13 @@ extern int errno;
return self==anObject; return self==anObject;
} }
- (int)compare:anotherObject; - (int)compare:(id)anotherObject;
{ {
if ([self isEqual:anotherObject]) if ([self isEqual:anotherObject])
return 0; return 0;
// Ordering objects by their address is pretty useless, // Ordering objects by their address is pretty useless,
// so subclasses should override this is some useful way. // so subclasses should override this is some useful way.
else if (self > anotherObject) else if ((id)self > anotherObject)
return 1; return 1;
else else
return -1; return -1;

@ -908,7 +908,7 @@ objc_read_class (struct objc_typed_stream *stream, Class *class)
objc_read_unsigned_long (stream, &version); objc_read_unsigned_long (stream, &version);
objc_hash_add (&stream->class_table, objc_hash_add (&stream->class_table,
(*class)->name, (void *)version); (*class)->name, (void *)(size_t) version);
} }
else if ((buf[0]&_B_CODE) == _B_UCOMM) else if ((buf[0]&_B_CODE) == _B_UCOMM)

@ -27,7 +27,7 @@ Boston, MA 02110-1301, USA. */
#ifndef __objc_decls_INCLUDE_GNU #ifndef __objc_decls_INCLUDE_GNU
#define __objc_decls_INCLUDE_GNU #define __objc_decls_INCLUDE_GNU
#if !defined(__MINGW32__) && (defined (_WIN32) || defined (__WIN32__) || defined (WIN32)) #if (defined (_WIN32) || defined (__WIN32__) || defined (WIN32))
#ifdef DLL_EXPORT /* defined by libtool (if required) */ #ifdef DLL_EXPORT /* defined by libtool (if required) */
# define objc_EXPORT __declspec(dllexport) # define objc_EXPORT __declspec(dllexport)

@ -39,8 +39,10 @@ extern "C" {
#ifdef __vxworks #ifdef __vxworks
typedef int BOOL; typedef int BOOL;
#else #else
#ifndef BOOL
typedef unsigned char BOOL; typedef unsigned char BOOL;
#endif #endif
#endif
#define YES (BOOL)1 #define YES (BOOL)1
#define NO (BOOL)0 #define NO (BOOL)0

@ -685,14 +685,14 @@ __objc_print_dtable_stats ()
#endif #endif
printf ("arrays: %d = %ld bytes\n", narrays, printf ("arrays: %d = %ld bytes\n", narrays,
(long) narrays * sizeof (struct sarray)); (long) ((size_t) narrays * sizeof (struct sarray)));
total += narrays * sizeof (struct sarray); total += narrays * sizeof (struct sarray);
printf ("buckets: %d = %ld bytes\n", nbuckets, printf ("buckets: %d = %ld bytes\n", nbuckets,
(long) nbuckets * sizeof (struct sbucket)); (long) ((size_t) nbuckets * sizeof (struct sbucket)));
total += nbuckets * sizeof (struct sbucket); total += nbuckets * sizeof (struct sbucket);
printf ("idxtables: %d = %ld bytes\n", printf ("idxtables: %d = %ld bytes\n",
idxsize, (long) idxsize * sizeof (void *)); idxsize, (long) ((size_t) idxsize * sizeof (void *)));
total += idxsize * sizeof (void *); total += idxsize * sizeof (void *);
printf ("-----------------------------------\n"); printf ("-----------------------------------\n");
printf ("total: %d bytes\n", total); printf ("total: %d bytes\n", total);

@ -72,12 +72,12 @@ __objc_thread_detach(void (*func)(void *arg), void *arg)
arg, 0, &thread_id))) arg, 0, &thread_id)))
#else #else
// According to MSDN documentation threads which use libc functions should call _beginthreadex not CreateThread // According to MSDN documentation threads which use libc functions should call _beginthreadex not CreateThread
if ((HANDLE)-1 == (win32_handle = (HANDLE)_beginthreadex(NULL, 0, (void*)func, arg, 0, (int*)&thread_id))) if ((HANDLE)-1 == (win32_handle = (HANDLE)_beginthreadex(NULL, 0, (void*)func, arg, 0, (unsigned*)&thread_id)))
#endif #endif
thread_id = 0; thread_id = 0;
CloseHandle((HANDLE)win32_handle); CloseHandle((HANDLE)win32_handle);
return (objc_thread_t)thread_id; return (objc_thread_t)(size_t) thread_id;
} }
/* Set the current thread's priority. */ /* Set the current thread's priority. */
@ -162,7 +162,7 @@ __objc_thread_exit(void)
objc_thread_t objc_thread_t
__objc_thread_id(void) __objc_thread_id(void)
{ {
return (objc_thread_t)GetCurrentThreadId(); return (objc_thread_t)(size_t) GetCurrentThreadId();
} }
/* Sets the thread's local storage pointer. */ /* Sets the thread's local storage pointer. */

@ -114,6 +114,9 @@ __objc_thread_detach_function (struct __objc_thread_start_state *istate)
/* Exit the thread */ /* Exit the thread */
objc_thread_exit (); objc_thread_exit ();
/* never reached. */
abort ();
} }
/* /*

Loading…
Cancel
Save