From: Stephen D. <sd...@us...> - 2005-07-30 04:06:15
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3800/include Modified Files: ns.h nsthread.h Log Message: * include/ns.h: * include/nsthread.h: * nsd/tclthread.c: * nsd/tclfile.c: * nsthread/Makefile: * nsthread/compat: * nscgi/nscgi.c: Remove a bunch of truly ancient compatibility macros and functions. Index: ns.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/ns.h,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** ns.h 30 Jul 2005 03:17:50 -0000 1.39 --- ns.h 30 Jul 2005 04:06:01 -0000 1.40 *************** *** 1480,1527 **** */ ! #ifndef NS_NOCOMPAT ! #define DllExport NS_EXPORT ! #define Ns_Select select ! #define Ns_InfoHome() Ns_InfoHomePath() ! #define Ns_InfoServer() Ns_InfoServerName() ! #define Ns_InfoVersion() Ns_InfoServerVersion() ! #define Ns_RequestAuthorize(s,m,u,au,ap,p) Ns_AuthorizeRequest(s,m,u,au,ap,p) ! #define Ns_RequestFree(r) Ns_FreeRequest(r) ! #define Ns_ResetReturn(c) Ns_ConnResetReturn(c) ! #define Ns_PutsConn(c,s) Ns_ConnPuts(c,s) ! #define Ns_ExpiresHeader(c,h) Ns_ConnSetExpiresHeader(c,h) ! #define Ns_ReturnHtml(c,s,h,l) Ns_ConnReturnHtml(c,s,h,l) ! #define Ns_ReturnOk(c) Ns_ConnReturnOk(c) ! #define Ns_ReturnNoResponse(c) Ns_ConnReturnNoResponse(c) ! #define Ns_ReturnRedirect(c,l) Ns_ConnReturnRedirect(c,l) ! #define Ns_ReturnNotModified(c) Ns_ConnReturnNotModified(c) ! #define Ns_ReturnBadRequest(c,r) Ns_ConnReturnBadRequest(c,r) ! #define Ns_ReturnUnauthorized(c) Ns_ConnReturnUnauthorized(c) ! #define Ns_ReturnForbidden(c) Ns_ConnReturnForbidden(c) ! #define Ns_ReturnNotFound(c) Ns_ConnReturnNotFound(c) ! #define Ns_ReturnInternalError(c) Ns_ConnReturnInternalError(c) ! #define Ns_ReturnNotImplemented(c) Ns_ConnReturnNotImplemented(c) ! #define Ns_ReturnStatus(c,s) Ns_ConnReturnStatus(c,s) ! #define Ns_TypeHeader(c,t) Ns_ConnSetTypeHeader(c,t) ! #define Ns_LengthHeader(c,l) Ns_ConnSetLengthHeader(c,l) ! #define Ns_LastModifiedHeader(c,w) Ns_ConnSetLastModifiedHeader(c,w) ! #define Ns_ReturnFile(c,s,t,f) Ns_ConnReturnFile(c,s,t,f) ! #define Ns_ReturnOpenFile(c,s,t,f,l) Ns_ConnReturnOpenFile(c,s,t,f,l) ! #define Ns_ReturnNotice(c,s,t,m) Ns_ConnReturnNotice(c,s,t,m) ! #define Ns_ReturnAdminNotice(c,s,t,m) Ns_ConnReturnAdminNotice(c,s,t,m) ! #define Ns_HeadersFlush(c,s) Ns_ConnFlushHeaders(c,s) ! #define Ns_HeadersPut(Nc,f,v) Ns_ConnSetHeaders(Nc,f,v) ! #define Ns_HeadersCondPut(c,f,v) Ns_ConnCondSetHeaders(c,f,v) ! #define Ns_HeadersReplace(c,n) Ns_ConnReplaceHeaders(c,n) ! #define Ns_HeadersRequired(c,t,l) Ns_ConnSetRequiredHeaders(c,t,l) ! #define Ns_ConfigPath Ns_ConfigGetPath ! #define Ns_ConfigSection(s) Ns_ConfigGetSection(s) ! #define Ns_ConfigSections() Ns_ConfigGetSections() ! #define Ns_ConfigGet(s,k) Ns_ConfigGetValue(s,k) ! #define Ns_ConfigGetExact(s,k) Ns_ConfigGetValueExact(s,k) ! #define Ns_UrlEncode(p,u) Ns_EncodeUrlCharset(p,u,NULL) ! #define Ns_UrlDecode(p,u) Ns_DecodeUrlCharset(p,u,NULL) ! #define Ns_EncodeUrl(p,u) Ns_EncodeUrlCharset(p,u,NULL) ! #define Ns_DecodeUrl(p,u) Ns_DecodeUrlCharset(p,u,NULL) #endif --- 1480,1485 ---- */ ! #ifdef NS_NOCOMPAT ! # error "No compatibility macros at present" #endif Index: nsthread.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/nsthread.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** nsthread.h 10 Jun 2005 21:52:36 -0000 1.7 --- nsthread.h 30 Jul 2005 04:06:01 -0000 1.8 *************** *** 316,418 **** - #ifndef NS_NOCOMPAT - - /* - * Unsupported legacy API's and macros. - */ - - /* - * compat.c: - */ - - typedef struct Ns_Semaphore_ *Ns_Semaphore; - typedef struct Ns_CriticalSection_ *Ns_CriticalSection; - typedef struct Ns_ThreadLocalStorage_ *Ns_ThreadLocalStorage; - typedef struct Ns_Event_ *Ns_Event; - - NS_EXTERN int Ns_InitializeMutex(Ns_Mutex *mutexPtr); - NS_EXTERN int Ns_DestroyMutex(Ns_Mutex *mutexPtr); - NS_EXTERN int Ns_LockMutex(Ns_Mutex *mutexPtr); - NS_EXTERN int Ns_UnlockMutex(Ns_Mutex *mutexPtr); - NS_EXTERN int Ns_InitializeCriticalSection(Ns_CriticalSection *cs); - NS_EXTERN int Ns_DestroyCriticalSection(Ns_CriticalSection *cs); - NS_EXTERN int Ns_EnterCriticalSection(Ns_CriticalSection *cs); - NS_EXTERN int Ns_LeaveCriticalSection(Ns_CriticalSection *cs); - NS_EXTERN int Ns_InitializeEvent(Ns_Event *event); - NS_EXTERN int Ns_DestroyEvent(Ns_Event *event); - NS_EXTERN int Ns_SetEvent(Ns_Event *event); - NS_EXTERN int Ns_BroadcastEvent(Ns_Event *event); - NS_EXTERN int Ns_WaitForEvent(Ns_Event *event, Ns_Mutex *lock); - NS_EXTERN int Ns_TimedWaitForEvent(Ns_Event *event, Ns_Mutex *lock, int timeout); - NS_EXTERN int Ns_AbsTimedWaitForEvent(Ns_Event *event, Ns_Mutex *lock, - time_t abstime); - NS_EXTERN int Ns_UTimedWaitForEvent(Ns_Event *event, Ns_Mutex *lock, int seconds, - int microseconds); - NS_EXTERN int Ns_InitializeRWLock(Ns_RWLock *lock); - NS_EXTERN int Ns_DestroyRWLock(Ns_RWLock *lock); - NS_EXTERN int Ns_ReadLockRWLock(Ns_RWLock *lock); - NS_EXTERN int Ns_ReadUnlockRWLock(Ns_RWLock *lock); - NS_EXTERN int Ns_WriteLockRWLock(Ns_RWLock *lock); - NS_EXTERN int Ns_WriteUnlockRWLock(Ns_RWLock *lock); - NS_EXTERN int Ns_InitializeSemaphore(Ns_Semaphore *sema, int initCount); - NS_EXTERN int Ns_DestroySemaphore(Ns_Semaphore *sema); - NS_EXTERN int Ns_WaitForSemaphore(Ns_Semaphore *sema); - NS_EXTERN int Ns_ReleaseSemaphore(Ns_Semaphore *sema, int count); - NS_EXTERN int Ns_AllocThreadLocalStorage(Ns_ThreadLocalStorage *tls, - Ns_TlsCleanup *cleanup); - NS_EXTERN int Ns_SetThreadLocalStorage(Ns_ThreadLocalStorage *tls, void *p); - NS_EXTERN int Ns_GetThreadLocalStorage(Ns_ThreadLocalStorage *tls, void **p); - NS_EXTERN int Ns_WaitForThread(Ns_Thread *threadPtr); - NS_EXTERN int Ns_WaitThread(Ns_Thread *threadPtr, int *exitCodePtr); - NS_EXTERN void Ns_ExitThread(int exitCode); - NS_EXTERN int Ns_BeginDetachedThread(Ns_ThreadProc *proc, void *arg); - NS_EXTERN int Ns_BeginThread(Ns_ThreadProc *proc, void *arg, Ns_Thread *thrPtr); - NS_EXTERN int Ns_GetThreadId(void); - NS_EXTERN void Ns_GetThread(Ns_Thread *threadPtr); - - /* - * pool.c: - */ - - typedef struct Ns_Pool_ *Ns_Pool; - - NS_EXTERN int nsMemNumBuckets; - NS_EXTERN Ns_Pool *Ns_PoolCreate(char *name); - NS_EXTERN void Ns_PoolFlush(Ns_Pool *pool); - NS_EXTERN void Ns_PoolDestroy(Ns_Pool *pool); - NS_EXTERN void *Ns_PoolAlloc(Ns_Pool *pool, size_t size); - NS_EXTERN void Ns_PoolFree(Ns_Pool *pool, void *cp); - NS_EXTERN void *Ns_PoolRealloc(Ns_Pool *pool, void *ptr, size_t size); - NS_EXTERN void *Ns_PoolCalloc(Ns_Pool *pool, size_t elsize, size_t nelem); - NS_EXTERN char *Ns_PoolStrDup(Ns_Pool *pool, char *old); - NS_EXTERN char *Ns_PoolStrCopy(Ns_Pool *pool, char *old); - NS_EXTERN void *Ns_ThreadMalloc(size_t size); - NS_EXTERN void *Ns_ThreadAlloc(size_t size); - NS_EXTERN void *Ns_ThreadRealloc(void *ptr, size_t size); - NS_EXTERN void Ns_ThreadFree(void *ptr); - NS_EXTERN void *Ns_ThreadCalloc(size_t nelem, size_t elsize); - NS_EXTERN char *Ns_ThreadStrDup(char *old); - NS_EXTERN char *Ns_ThreadStrCopy(char *old); - - #define Ns_Readdir ns_readdir - #define Ns_Localtime ns_localtime - #define Ns_Gmtime ns_gmtime - #define Ns_Ctime ns_ctime - #define Ns_Asctime ns_asctime - #define Ns_Strtok ns_strtok - #define Ns_InetNtoa ns_inet_ntoa - #define Ns_Signal ns_signal - #define Ns_Sigmask ns_sigmask - #define Ns_Sigwait ns_sigwait - #define Ns_Malloc ns_malloc - #define Ns_Realloc ns_realloc - #define Ns_Free ns_free - #define Ns_Calloc ns_calloc - #define Ns_StrDup ns_strdup - #define Ns_StrCopy ns_strcopy - #define Ns_ThreadAlloc Ns_ThreadMalloc - #define Ns_Fork ns_fork - - #endif /* NS_NOCOMPAT */ - #endif /* NSTHREAD_H */ --- 316,318 ---- |