tt/mini_isam: add new isam_prototypes.h include file and fix up problems
There were a variety of potential 64b problems due to the complete lack of prototype declarations. So, we add a file, isam_prototypes.h, generated mostly by the 'cproto' tool. We also fixed up some errors that having proper prototypes pointed out, mainly in passing ints where pointers were expected and vice versa. The iserase() function was supposed to accept a char *, but was defined as only accepting a char. Fun stuff like that.
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
*/
|
||||
|
||||
#include "isam_impl.h"
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
@@ -81,8 +82,6 @@ _isfatal_error(char *msg)
|
||||
void
|
||||
_isfatal_error1(char *msg)
|
||||
{
|
||||
extern int _is_rpcnetisamd; /* is 1 if this is rpc.netisamd */
|
||||
extern int _is_netisamlockd; /* is 1 if this is netisamlockd */
|
||||
int logerr;
|
||||
|
||||
if (fatal_error_user_handler) {
|
||||
@@ -113,14 +112,17 @@ _isam_warning(char *msg)
|
||||
}
|
||||
|
||||
/* Set user specified fatal_error handler */
|
||||
int (*_isfatal_error_set_func(int(*func)()))()
|
||||
int _isfatal_error_set_func(int(*func)())
|
||||
{
|
||||
#if 0
|
||||
int (*oldfunc)();
|
||||
|
||||
oldfunc = fatal_error_user_handler;
|
||||
#endif
|
||||
|
||||
fatal_error_user_handler = func;
|
||||
|
||||
return (oldfunc);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user