rx-warning-cleanup-and-afsconfig-20010612
[openafs.git] / src / rx / rx_misc.c
index 589fb97..c469d9c 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <afs/param.h>
+#include <afsconfig.h>
 #ifdef KERNEL
 #include <afs/sysincludes.h>
 #include <afs/afsincludes.h>
 #ifdef AFS_PTHREAD_ENV
 #include "rx.h"
 #endif /* AFS_PTHREAD_ENV */
+#include <stdlib.h>
 #endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 
 /*
  * We currently only include below the errors that
@@ -36,6 +48,7 @@
  * Convert from the local (host) to the standard 
  * (network) system error code.
  */
+int
 hton_syserr_conv(code)
     register afs_int32 code;
 {
@@ -58,6 +71,7 @@ hton_syserr_conv(code)
  * Convert from the standard (Network) format to the
  * local (host) system error code.
  */
+int
 ntoh_syserr_conv(int code)
 {
     register afs_int32 err;
@@ -114,15 +128,17 @@ char * osi_alloc(x)
     return (char *)(mem_alloc(x));
 }
 
+int
 osi_free(x, size)
     char *x;
     afs_int32 size; 
 {
-    if ((x == &memZero) || !x) return;
+    if ((x == &memZero) || !x) return 0;
     LOCK_MALLOC_STATS
     osi_alloccnt--; osi_allocsize -= size;
     UNLOCK_MALLOC_STATS
     mem_free(x, size);
+    return 0;
 }
 #endif
 #endif /* KERNEL */