Bug 757593: Fix build error. _MD_INTERVAL_INIT used to be defined in
authorwtc%google.com
Thu, 25 Oct 2012 14:54:24 +0000
changeset 4422 39f3d1ab7a88a15187af5da7dafb0c464c19cf65
parent 4421 13eb3a1cdc270a82a4e9d4fafc87c78168b62d55
child 4423 6711200f19ff8423956c38ee7d67049ac48ea483
push idunknown
push userunknown
push dateunknown
bugs757593
Bug 757593: Fix build error. _MD_INTERVAL_INIT used to be defined in _unixos.h. Now it needs to be defined in this file for Solaris. Remove an unnecessary #ifndef _PR_PTHREADS test and redundant PRIntervalTime function declarations and macro definitions in the #if !defined(_PR_PTHREADS) part of the file. TBR=kaie.
pr/include/md/_solaris.h
--- a/pr/include/md/_solaris.h
+++ b/pr/include/md/_solaris.h
@@ -105,16 +105,17 @@ struct _md_sockaddr_in6 {
 };
 #endif
 #if defined(_PR_PTHREADS)
 #define _PR_HAVE_GETHOST_R
 #define _PR_HAVE_GETHOST_R_POINTER
 #endif
 
 #include "prinrval.h"
+#define _MD_INTERVAL_INIT()
 NSPR_API(PRIntervalTime) _MD_Solaris_GetInterval(void);
 #define _MD_GET_INTERVAL                  _MD_Solaris_GetInterval
 NSPR_API(PRIntervalTime) _MD_Solaris_TicksPerSecond(void);
 #define _MD_INTERVAL_PER_SEC              _MD_Solaris_TicksPerSecond
 
 #if defined(_PR_HAVE_ATOMIC_OPS)
 /*
 ** Atomic Operations
@@ -434,19 +435,17 @@ struct _MDCPU_Unix {
 #define _PR_IOQ_POLLFDS_SIZE(_cpu)	((_cpu)->md.md_unix.ioq_pollfds_size)
 
 #define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu)	32
 
 struct _MDCPU {
 	struct _MDCPU_Unix md_unix;
 };
 
-#ifndef _PR_PTHREADS
 #define _MD_INIT_LOCKS()
-#endif
 #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()
 
@@ -462,21 +461,16 @@ extern PRStatus _MD_WAKEUP_WAITER(struct
 extern void     _MD_YIELD(void);
 extern PRStatus _MD_InitializeThread(PRThread *thread);
 extern void     _MD_SET_PRIORITY(struct _MDThread *thread,
 	PRThreadPriority newPri);
 extern PRStatus _MD_CREATE_THREAD(PRThread *thread, void (*start) (void *),
 	PRThreadPriority priority, PRThreadScope scope, PRThreadState state,
         PRUint32 stackSize);
 
-NSPR_API(PRIntervalTime)				_MD_Solaris_GetInterval(void);
-#define _MD_GET_INTERVAL				_MD_Solaris_GetInterval
-NSPR_API(PRIntervalTime)				_MD_Solaris_TicksPerSecond(void);
-#define _MD_INTERVAL_PER_SEC			_MD_Solaris_TicksPerSecond
-
 /* The following defines the unwrapped versions of select() and poll(). */
 extern int _select(int nfds, fd_set *readfds, fd_set *writefds,
 	fd_set *exceptfds, struct timeval *timeout);
 #define _MD_SELECT	_select
 
 #include <stropts.h>
 #include <poll.h>
 #define _MD_POLL _poll