Far-reaching changes to make BitchX compatible with 64 bit architectures

like x86-64, where sizeof(int) != sizeof (void *).  This involves correctly
casting every function pointer from the global table to the correct
function type, which has the added benefit of allowing type-checking of
function arguments and return values.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@26 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2008-04-30 13:57:56 +00:00
parent 7eac4a00ce
commit 3de93b1dbc
34 changed files with 660 additions and 710 deletions

View File

@@ -138,7 +138,7 @@ char * urldecode (char *);
/* From words.c */
#define SOS -32767
#define EOS 32767
char *BX_search (register char *, char **, char *, int);
char *BX_strsearch (register char *, char *, char *, int);
char *BX_move_to_abs_word (const register char *, char **, int);
char *BX_move_word_rel (const register char *, char **, int);
char *BX_extract (char *, int, int);
@@ -197,16 +197,16 @@ int lame_resolv (const char *, struct sockaddr_foobar *);
((double)x/_1KB): (double)x)))) )
void *n_malloc (size_t, const char *, const char *, const int);
void *n_realloc (void **, size_t, const char *, const char *, const int);
void *n_realloc (void *, size_t, const char *, const char *, const int);
void *n_free (void **, const char *, const char *, const int);
void *n_free (void *, const char *, const char *, const int);
#define MODULENAME NULL
#define new_malloc(x) n_malloc(x, MODULENAME, __FILE__, __LINE__)
#define new_free(x) n_free((void **)(x), MODULENAME, __FILE__, __LINE__)
#define new_free(x) (*(x) = n_free(*(x), MODULENAME, __FILE__, __LINE__))
#define RESIZE(x, y, z) n_realloc ((void **)& (x), sizeof(y) * (z), MODULENAME, __FILE__, __LINE__)
#define RESIZE(x, y, z) ((x) = n_realloc((x), sizeof(y) * (z), MODULENAME, __FILE__, __LINE__))
#define malloc_strcpy(x, y) n_malloc_strcpy((char **)x, (char *)y, MODULENAME, __FILE__, __LINE__)
#define malloc_strcat(x, y) n_malloc_strcat((char **)x, (char *)y, MODULENAME, __FILE__, __LINE__)
#define m_strdup(x) n_m_strdup(x, MODULENAME, __FILE__, __LINE__)