[kaffe] CVS kaffe (doogie): Dalibor's last checkin included an
older version of this file by mistake,
Kaffe CVS
cvs-commits at kaffe.org
Mon Dec 20 20:51:18 PST 2004
PatchSet 5691
Date: 2004/12/21 04:47:12
Author: doogie
Branch: HEAD
Tag: (none)
Log:
Dalibor's last checkin included an older version of this file by mistake,
reverting.
Members:
ChangeLog:1.3237->1.3238
libltdl/ltdl.c:1.40->1.41
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3237 kaffe/ChangeLog:1.3238
--- kaffe/ChangeLog:1.3237 Tue Dec 21 03:47:04 2004
+++ kaffe/ChangeLog Tue Dec 21 04:47:12 2004
@@ -1,3 +1,28 @@
+2004-12-20 Adam Heath <doogie at brainfood.com>
+
+ * libltdl/ltdl.c:
+ Dalibor's last checkin included an older version of this file by
+ mistake, reverting.
+
+2004-12-20 Adam Heath <doogie at brainfood.com>
+
+ * kaffe/kaffevm/classMethod.c, kaffe/kaffevm/classMethod.h
+ kaffe/kaffevm/itypes.c, kaffe/kaffevm/kaffe.def,
+ kaffe/kaffevm/soft.c, kaffe/kaffevm/thread.c,
+ kaffe/kaffevm/jit/methodcalls.c, kaffe/kaffevm/jit3/icode.c,
+ kaffe/kaffevm/jit3/machine.c, kaffe/kaffevm/jit3/registers.c,
+ kaffe/kaffevm/jit3/slots.c, kaffe/kaffevm/jit3/slots.h,
+ kaffe/kaffevm/kaffe-gc/gc-mem.c,
+ kaffe/kaffevm/systems/unix-pthreads/thread-impl.c,
+ kaffe/kaffevm/systems/unix-pthreads/thread-internal.h,
+ libraries/clib/native/ByteToCharIconv.c,
+ libraries/clib/native/CharToByteIconv.c,
+ libraries/clib/native/Class.c, libraries/clib/native/Float.c,
+ libraries/clib/native/Object.c, libraries/clib/native/System.c,
+ libraries/clib/net/PlainDatagramSocketImpl.c,
+ replace/getaddrinfo.c:
+ Various gcc and sparse fixes all over the board.
+
2004-12-21 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/util/Currency.java:
Index: kaffe/libltdl/ltdl.c
diff -u kaffe/libltdl/ltdl.c:1.40 kaffe/libltdl/ltdl.c:1.41
--- kaffe/libltdl/ltdl.c:1.40 Tue Dec 21 02:43:10 2004
+++ kaffe/libltdl/ltdl.c Tue Dec 21 04:47:13 2004
@@ -249,7 +249,7 @@
#endif
#define LT_DLMEM_REASSIGN(p, q) LT_STMT_START { \
- if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = 0; } \
+ if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = NULL; } \
} LT_STMT_END
@@ -265,7 +265,7 @@
strdup(str)
const char *str;
{
- char *tmp = 0;
+ char *tmp = NULL;
if (str)
{
@@ -820,7 +820,7 @@
lt_dlerror_table
#undef LT_ERROR
- 0
+ NULL
};
/* This structure is used for the list of registered loaders. */
@@ -897,11 +897,11 @@
/* The mutex functions stored here are global, and are necessarily the
same for all threads that wish to share access to libltdl. */
-static lt_dlmutex_lock *lt_dlmutex_lock_func = 0;
-static lt_dlmutex_unlock *lt_dlmutex_unlock_func = 0;
-static lt_dlmutex_seterror *lt_dlmutex_seterror_func = 0;
-static lt_dlmutex_geterror *lt_dlmutex_geterror_func = 0;
-static const char *lt_dllast_error = 0;
+static lt_dlmutex_lock *lt_dlmutex_lock_func = NULL;
+static lt_dlmutex_unlock *lt_dlmutex_unlock_func = NULL;
+static lt_dlmutex_seterror *lt_dlmutex_seterror_func = NULL;
+static lt_dlmutex_geterror *lt_dlmutex_geterror_func = NULL;
+static const char *lt_dllast_error = NULL;
/* Either set or reset the mutex functions. Either all the arguments must
@@ -950,7 +950,7 @@
/* --- ERROR HANDLING --- */
-static const char **user_error_strings = 0;
+static const char **user_error_strings = NULL;
static int errorcount = LT_ERROR_MAX;
int
@@ -959,7 +959,7 @@
{
int errindex = 0;
int result = -1;
- const char **temp = (const char **) 0;
+ const char **temp = NULL;
assert (diagnostic);
@@ -1151,9 +1151,9 @@
# ifdef NEED_USCORE
"_",
# else
- 0,
+ NULL,
# endif
- sys_dl_open, sys_dl_close, sys_dl_sym, 0, 0 };
+ sys_dl_open, sys_dl_close, sys_dl_sym, NULL, NULL };
#endif /* HAVE_LIBDL */
@@ -1940,8 +1940,8 @@
const lt_dlsymlist *syms;
} lt_dlsymlists_t;
-static const lt_dlsymlist *default_preloaded_symbols = 0;
-static lt_dlsymlists_t *preloaded_symbols = 0;
+static const lt_dlsymlist *default_preloaded_symbols = NULL;
+static lt_dlsymlists_t *preloaded_symbols = NULL;
static int
presym_init (loader_data)
@@ -1951,7 +1951,7 @@
LT_DLMUTEX_LOCK ();
- preloaded_symbols = 0;
+ preloaded_symbols = NULL;
if (default_preloaded_symbols)
{
errors = lt_dlpreload (default_preloaded_symbols);
@@ -1977,7 +1977,7 @@
lists = lists->next;
LT_DLFREE (tmp);
}
- preloaded_symbols = 0;
+ preloaded_symbols = NULL;
LT_DLMUTEX_UNLOCK ();
@@ -2086,7 +2086,7 @@
lt_module module;
{
/* Just to silence gcc -Wall */
- module = 0;
+ module = NULL;
return 0;
}
@@ -2111,11 +2111,11 @@
LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND));
- return 0;
+ return NULL;
}
static struct lt_user_dlloader presym = {
- 0, presym_open, presym_close, presym_sym, presym_exit, 0
+ NULL, presym_open, presym_close, presym_sym, presym_exit, NULL
};
@@ -2189,9 +2189,9 @@
size_t *pargz_len));
static int file_not_found LT_PARAMS((void));
-static char *user_search_path= 0;
-static lt_dlloader *loaders = 0;
-static lt_dlhandle handles = 0;
+static char *user_search_path= NULL;
+static lt_dlloader *loaders = NULL;
+static lt_dlhandle handles = NULL;
static int initialized = 0;
/* Initialize libltdl. */
@@ -2205,20 +2205,20 @@
/* Initialize only at first call. */
if (++initialized == 1)
{
- handles = 0;
- user_search_path = 0; /* empty search path */
+ handles = NULL;
+ user_search_path = NULL; /* empty search path */
#if HAVE_LIBDL
- errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen");
+ errors += lt_dlloader_add (lt_dlloader_next (NULL), &sys_dl, "dlopen");
#endif
#if HAVE_SHL_LOAD
- errors += lt_dlloader_add (lt_dlloader_next (0), &sys_shl, "dlopen");
+ errors += lt_dlloader_add (lt_dlloader_next (NULL), &sys_shl, "dlopen");
#endif
#ifdef __WINDOWS__
- errors += lt_dlloader_add (lt_dlloader_next (0), &sys_wll, "dlopen");
+ errors += lt_dlloader_add (lt_dlloader_next (NULL), &sys_wll, "dlopen");
#endif
#ifdef __BEOS__
- errors += lt_dlloader_add (lt_dlloader_next (0), &sys_bedl, "dlopen");
+ errors += lt_dlloader_add (lt_dlloader_next (NULL), &sys_bedl, "dlopen");
#endif
#if HAVE_DLD
errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dld, "dld");
@@ -2227,7 +2227,7 @@
errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dyld, "dyld");
errors += sys_dyld_init();
#endif
- errors += lt_dlloader_add (lt_dlloader_next (0), &presym, "dlpreload");
+ errors += lt_dlloader_add (lt_dlloader_next (NULL), &presym, "dlpreload");
if (presym_init (presym.dlloader_data))
{
@@ -2345,7 +2345,7 @@
LT_DLMEM_REASSIGN (loader, next);
}
- loaders = 0;
+ loaders = NULL;
}
done:
@@ -2418,7 +2418,7 @@
}
else
{
- cur->info.filename = 0;
+ cur->info.filename = NULL;
}
while (loader)
@@ -2427,7 +2427,7 @@
cur->module = loader->module_open (data, filename);
- if (cur->module != 0)
+ if (cur->module != NULL)
{
break;
}
@@ -2458,7 +2458,7 @@
const char *dlname;
{
int error = 0;
- char *filename = 0;
+ char *filename = NULL;
size_t filename_len = 0;
size_t dirname_len = LT_STRLEN (dirname);
@@ -2553,7 +2553,7 @@
const char *path;
char **pcanonical;
{
- char *canonical = 0;
+ char *canonical = NULL;
assert (path && *path);
assert (pcanonical);
@@ -2657,9 +2657,9 @@
int filenamesize = 0;
size_t lenbase = LT_STRLEN (base_name);
size_t argz_len = 0;
- char *argz = 0;
- char *filename = 0;
- char *canonical = 0;
+ char *argz = NULL;
+ char *filename = NULL;
+ char *canonical = NULL;
LT_DLMUTEX_LOCK ();
@@ -2676,7 +2676,7 @@
goto cleanup;
{
- char *dir_name = 0;
+ char *dir_name = NULL;
while ((dir_name = argz_next (argz, argz_len, dir_name)))
{
size_t lendir = LT_STRLEN (dir_name);
@@ -2755,7 +2755,7 @@
const char *base_name;
char **pdir;
{
- FILE *file = 0;
+ FILE *file = NULL;
foreach_dirinpath (search_path, base_name, find_file_callback, pdir, &file);
@@ -2778,7 +2778,7 @@
/* Try to dlopen the file, but do not continue searching in any
case. */
if (tryall_dlopen (handle, filename) != 0)
- *handle = 0;
+ *handle = NULL;
return 1;
}
@@ -2792,11 +2792,11 @@
lt_dlhandle *handle;
{
if (!search_path)
- return 0;
+ return NULL;
if (!foreach_dirinpath (search_path, base_name, find_handle_callback,
- handle, 0))
- return 0;
+ handle, NULL))
+ return NULL;
return handle;
}
@@ -2807,10 +2807,10 @@
char *deplibs;
{
#if LTDL_DLOPEN_DEPLIBS
- char *p, *save_search_path = 0;
+ char *p, *save_search_path = NULL;
int depcount = 0;
int i;
- char **names = 0;
+ char **names = NULL;
#endif
int errors = 0;
@@ -3009,7 +3009,7 @@
}
else
{
- *dest = 0;
+ *dest = NULL;
}
return 0;
@@ -3035,17 +3035,17 @@
lt_dlhandle *phandle;
const char *filename;
{
- const char * ext = 0;
- const char * saved_error = 0;
- char * canonical = 0;
- char * base_name = 0;
- char * dir = 0;
- char * name = 0;
+ const char * ext = NULL;
+ const char * saved_error = NULL;
+ char * canonical = NULL;
+ char * base_name = NULL;
+ char * dir = NULL;
+ char * name = NULL;
int errors = 0;
lt_dlhandle newhandle;
assert (phandle);
- assert (*phandle == 0);
+ assert (*phandle == NULL);
LT_DLMUTEX_GETERROR (saved_error);
@@ -3053,7 +3053,7 @@
if (!filename)
{
*phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1);
- if (*phandle == 0)
+ if (*phandle == NULL)
return 1;
memset (*phandle, 0, sizeof(struct lt_dlhandle_struct));
@@ -3062,7 +3062,7 @@
/* lt_dlclose()ing yourself is very bad! Disallow it. */
LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG);
- if (tryall_dlopen (&newhandle, 0) != 0)
+ if (tryall_dlopen (&newhandle, NULL) != 0)
{
LT_DLFREE (*phandle);
return 1;
@@ -3110,12 +3110,12 @@
if (ext && strcmp (ext, archive_ext) == 0)
{
/* this seems to be a libtool module */
- FILE * file = 0;
- char * dlname = 0;
- char * old_name = 0;
- char * libdir = 0;
- char * deplibs = 0;
- char * line = 0;
+ FILE * file = NULL;
+ char * dlname = NULL;
+ char * old_name = NULL;
+ char * libdir = NULL;
+ char * deplibs = NULL;
+ char * line = NULL;
size_t line_len;
/* if we can't find the installed flag, it is probably an
@@ -3410,12 +3410,12 @@
lt_dlopen (filename)
const char *filename;
{
- lt_dlhandle handle = 0;
+ lt_dlhandle handle = NULL;
/* Just incase we missed a code path in try_dlopen() that reports
an error, but forgets to reset handle... */
if (try_dlopen (&handle, filename) != 0)
- return 0;
+ return NULL;
return handle;
}
@@ -3425,7 +3425,7 @@
static int
file_not_found ()
{
- const char *error = 0;
+ const char *error = NULL;
LT_DLMUTEX_GETERROR (error);
if (error == LT_DLSTRERROR (FILE_NOT_FOUND))
@@ -3442,9 +3442,9 @@
lt_dlopenext (filename)
const char *filename;
{
- lt_dlhandle handle = 0;
- char * tmp = 0;
- char * ext = 0;
+ lt_dlhandle handle = NULL;
+ char * tmp = NULL;
+ char * ext = NULL;
size_t len;
int errors = 0;
@@ -3472,7 +3472,7 @@
/* First try appending ARCHIVE_EXT. */
tmp = LT_EMALLOC (char, len + LT_STRLEN (archive_ext) + 1);
if (!tmp)
- return 0;
+ return NULL;
strcpy (tmp, filename);
strcat (tmp, archive_ext);
@@ -3496,7 +3496,7 @@
LT_DLFREE (tmp);
tmp = LT_EMALLOC (char, len + LT_STRLEN (shlib_ext) + 1);
if (!tmp)
- return 0;
+ return NULL;
strcpy (tmp, filename);
}
@@ -3521,7 +3521,7 @@
names we tried. */
LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND));
LT_DLFREE (tmp);
- return 0;
+ return NULL;
}
@@ -3557,7 +3557,7 @@
size_t *pargz_len;
const char *entry;
{
- char *before = 0;
+ char *before = NULL;
assert (pargz);
assert (pargz_len);
@@ -3582,9 +3582,9 @@
const char *dirnam;
struct dirent *dp;
{
- char *buf = 0;
+ char *buf = NULL;
size_t buf_len = 0;
- char *end = 0;
+ char *end = NULL;
size_t end_offset = 0;
size_t dir_len = 0;
int errors = 0;
@@ -3647,7 +3647,7 @@
char **pargz;
size_t *pargz_len;
{
- DIR *dirp = 0;
+ DIR *dirp = NULL;
int errors = 0;
assert (dirnam && *dirnam);
@@ -3658,7 +3658,7 @@
dirp = opendir (dirnam);
if (dirp)
{
- struct dirent *dp = 0;
+ struct dirent *dp = NULL;
while ((dp = readdir (dirp)))
if (dp->d_name[0] != '.')
@@ -3689,7 +3689,7 @@
= (int (*) LT_PARAMS((const char *filename, lt_ptr data))) data1;
int is_done = 0;
- char *argz = 0;
+ char *argz = NULL;
size_t argz_len = 0;
if (list_files_by_dir (dirname, &argz, &argz_len) != 0)
@@ -3698,7 +3698,7 @@
goto cleanup;
{
- char *filename = 0;
+ char *filename = NULL;
while ((filename = argz_next (argz, argz_len, filename)))
if ((is_done = (*func) (filename, data2)))
break;
@@ -3729,31 +3729,31 @@
{
/* If a specific path was passed, search only the directories
listed in it. */
- is_done = foreach_dirinpath (search_path, 0,
+ is_done = foreach_dirinpath (search_path, NULL,
foreachfile_callback, func, data);
}
else
{
/* Otherwise search the default paths. */
- is_done = foreach_dirinpath (user_search_path, 0,
+ is_done = foreach_dirinpath (user_search_path, NULL,
foreachfile_callback, func, data);
if (!is_done)
{
- is_done = foreach_dirinpath (getenv("LTDL_LIBRARY_PATH"), 0,
+ is_done = foreach_dirinpath (getenv("LTDL_LIBRARY_PATH"), NULL,
foreachfile_callback, func, data);
}
#ifdef LTDL_SHLIBPATH_VAR
if (!is_done)
{
- is_done = foreach_dirinpath (getenv(LTDL_SHLIBPATH_VAR), 0,
+ is_done = foreach_dirinpath (getenv(LTDL_SHLIBPATH_VAR), NULL,
foreachfile_callback, func, data);
}
#endif
#ifdef LTDL_SYSSEARCHPATH
if (!is_done)
{
- is_done = foreach_dirinpath (getenv(LTDL_SYSSEARCHPATH), 0,
+ is_done = foreach_dirinpath (getenv(LTDL_SYSSEARCHPATH), NULL,
foreachfile_callback, func, data);
}
#endif
@@ -3844,13 +3844,13 @@
if (!handle)
{
LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE));
- return 0;
+ return NULL;
}
if (!symbol)
{
LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND));
- return 0;
+ return NULL;
}
lensym = LT_STRLEN (symbol) + LT_STRLEN (handle->loader->sym_prefix)
@@ -3866,7 +3866,7 @@
if (!sym)
{
LT_DLMUTEX_SETERROR (LT_DLSTRERROR (BUFFER_OVERFLOW));
- return 0;
+ return NULL;
}
}
@@ -3930,7 +3930,7 @@
const char *error;
LT_DLMUTEX_GETERROR (error);
- LT_DLMUTEX_SETERROR (0);
+ LT_DLMUTEX_SETERROR (NULL);
return error ? error : NULL;
}
@@ -3942,8 +3942,8 @@
const char *dir;
{
int errors = 0;
- char *canonical = 0;
- char *argz = 0;
+ char *canonical = NULL;
+ char *argz = NULL;
size_t argz_len = 0;
assert (ppath);
@@ -4016,7 +4016,7 @@
if (search_dir && *search_dir)
{
LT_DLMUTEX_LOCK ();
- if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0)
+ if (lt_dlpath_insertdir (&user_search_path, NULL, search_dir) != 0)
++errors;
LT_DLMUTEX_UNLOCK ();
}
@@ -4137,7 +4137,7 @@
if (!handle)
{
LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE));
- return 0;
+ return NULL;
}
return &(handle->info);
@@ -4227,7 +4227,7 @@
if (!temp)
{
- stale = 0;
+ stale = NULL;
goto done;
}
@@ -4287,7 +4287,7 @@
const char *loader_name;
{
int errors = 0;
- lt_dlloader *node = 0, *ptr = 0;
+ lt_dlloader *node = NULL, *ptr = NULL;
if ((dlloader == 0) /* diagnose null parameters */
|| (dlloader->module_open == 0)
@@ -4303,7 +4303,7 @@
if (!node)
return 1;
- node->next = 0;
+ node->next = NULL;
node->loader_name = loader_name;
node->sym_prefix = dlloader->sym_prefix;
node->dlloader_exit = dlloader->dlloader_exit;
@@ -4439,12 +4439,12 @@
lt_dlloader_name (place)
lt_dlloader *place;
{
- const char *name = 0;
+ const char *name = NULL;
if (place)
{
LT_DLMUTEX_LOCK ();
- name = place ? place->loader_name : 0;
+ name = place ? place->loader_name : NULL;
LT_DLMUTEX_UNLOCK ();
}
else
@@ -4459,12 +4459,12 @@
lt_dlloader_data (place)
lt_dlloader *place;
{
- lt_user_data *data = 0;
+ lt_user_data *data = NULL;
if (place)
{
LT_DLMUTEX_LOCK ();
- data = place ? &(place->dlloader_data) : 0;
+ data = place ? &(place->dlloader_data) : NULL;
LT_DLMUTEX_UNLOCK ();
}
else
@@ -4479,7 +4479,7 @@
lt_dlloader_find (loader_name)
const char *loader_name;
{
- lt_dlloader *place = 0;
+ lt_dlloader *place = NULL;
LT_DLMUTEX_LOCK ();
for (place = loaders; place; place = place->next)
More information about the kaffe
mailing list