Fixed compiler warnings, mostly undeclared functions. We acknoweldge
authorwtc
Mon, 13 Apr 1998 22:04:19 +0000
changeset 26 649ab14f437dbdcd9196be33354fa4a03f81fd79
parent 25 c7367d578192f253d503a55eee51dbf899f714ec
child 27 24426d4a58ab612e353ba45d27d6d3479a34ad8c
push idunknown
push userunknown
push dateunknown
Fixed compiler warnings, mostly undeclared functions. We acknoweldge the help of Nathan Torkington <gnat@frii.com>.
pr/include/md/_freebsd.h
--- a/pr/include/md/_freebsd.h
+++ b/pr/include/md/_freebsd.h
@@ -14,16 +14,18 @@
  * Communications Corporation.  Portions created by Netscape are
  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  * Reserved.
  */
 
 #ifndef nspr_freebsd_defs_h___
 #define nspr_freebsd_defs_h___
 
+#include "prthread.h"
+
 #include <sys/syscall.h>
 
 #define PR_LINKER_ARCH	"freebsd"
 #define _PR_SI_SYSNAME  "FREEBSD"
 #define _PR_SI_ARCHITECTURE "x86"
 #define PR_DLL_SUFFIX		".so.1.0"
 
 #define _PR_VMBASE              0x30000000
@@ -111,26 +113,43 @@ struct _MDCPU {
 #define _MD_NEW_LOCK(lock) PR_SUCCESS
 #define _MD_FREE_LOCK(lock)
 #define _MD_LOCK(lock)
 #define _MD_UNLOCK(lock)
 #define _MD_INIT_IO()
 #define _MD_IOQ_LOCK()
 #define _MD_IOQ_UNLOCK()
 
+extern PRStatus _MD_InitializeThread(PRThread *thread);
+
 #define _MD_INIT_RUNNING_CPU(cpu)       _MD_unix_init_running_cpu(cpu)
 #define _MD_INIT_THREAD                 _MD_InitializeThread
 #define _MD_EXIT_THREAD(thread)
 #define _MD_SUSPEND_THREAD(thread)      _MD_suspend_thread
 #define _MD_RESUME_THREAD(thread)       _MD_resume_thread
 #define _MD_CLEAN_THREAD(_thread)
 
+extern PRStatus _MD_CREATE_THREAD(
+    PRThread *thread,
+    void (*start) (void *),
+    PRThreadPriority priority,
+    PRThreadScope scope,
+    PRThreadState state,
+    PRUint32 stackSize);
+extern void _MD_SET_PRIORITY(struct _MDThread *thread, PRUintn newPri);
+extern PRStatus _MD_WAIT(PRThread *, PRIntervalTime timeout);
+extern PRStatus _MD_WAKEUP_WAITER(PRThread *);
+extern void _MD_YIELD(void);
+
 #endif /* ! _PR_PTHREADS */
 
-PR_EXTERN(void) _MD_EarlyInit(void);
+extern void _MD_EarlyInit(void);
+extern PRIntervalTime _PR_UNIX_GetInterval(void);
+extern PRIntervalTime _PR_UNIX_TicksPerSecond(void);
+
 #define _MD_EARLY_INIT                  _MD_EarlyInit
 #define _MD_FINAL_INIT			_PR_UnixInit
 #define _MD_GET_INTERVAL                  _PR_UNIX_GetInterval
 #define _MD_INTERVAL_PER_SEC              _PR_UNIX_TicksPerSecond
 
 /*
  * We wrapped the select() call.  _MD_SELECT refers to the built-in,
  * unwrapped version.
@@ -173,9 +192,12 @@ extern int poll(struct pollfd *, unsigne
 #endif /* _PR_NEED_FAKE_POLL */
 
 /* freebsd has INADDR_LOOPBACK defined, but in /usr/include/rpc/types.h, and I didn't
    want to be including that.. */
 #ifndef INADDR_LOOPBACK
 #define INADDR_LOOPBACK         (u_long)0x7F000001
 #endif
 
-#endif /* nspr_linux_defs_h___ */
+/* For writev() */
+#include <sys/uio.h>
+
+#endif /* nspr_freebsd_defs_h___ */