You can subscribe to this list here.
2005 |
Jan
|
Feb
(32) |
Mar
(56) |
Apr
(92) |
May
(39) |
Jun
(226) |
Jul
(98) |
Aug
(66) |
Sep
|
Oct
(153) |
Nov
(43) |
Dec
(42) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(97) |
Feb
(141) |
Mar
(147) |
Apr
(80) |
May
(51) |
Jun
(93) |
Jul
(88) |
Aug
(50) |
Sep
(179) |
Oct
(48) |
Nov
(82) |
Dec
(71) |
2007 |
Jan
(42) |
Feb
(46) |
Mar
(123) |
Apr
(21) |
May
(139) |
Jun
(59) |
Jul
(34) |
Aug
(57) |
Sep
(47) |
Oct
(137) |
Nov
(49) |
Dec
(12) |
2008 |
Jan
(10) |
Feb
(8) |
Mar
(63) |
Apr
(17) |
May
(34) |
Jun
(38) |
Jul
(16) |
Aug
(62) |
Sep
(9) |
Oct
(121) |
Nov
(38) |
Dec
(4) |
2009 |
Jan
|
Feb
(11) |
Mar
(9) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(4) |
Apr
(10) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(12) |
2012 |
Jan
(26) |
Feb
(1) |
Mar
(15) |
Apr
(1) |
May
(1) |
Jun
(7) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
(52) |
Nov
(8) |
Dec
(25) |
2013 |
Jan
(35) |
Feb
(14) |
Mar
(10) |
Apr
(10) |
May
(29) |
Jun
(16) |
Jul
(5) |
Aug
(8) |
Sep
(8) |
Oct
(6) |
Nov
(1) |
Dec
(3) |
2014 |
Jan
(16) |
Feb
(13) |
Mar
(5) |
Apr
(9) |
May
(21) |
Jun
(6) |
Jul
(5) |
Aug
(2) |
Sep
(59) |
Oct
(115) |
Nov
(122) |
Dec
(45) |
2015 |
Jan
(31) |
Feb
(32) |
Mar
(19) |
Apr
(25) |
May
(3) |
Jun
(4) |
Jul
(18) |
Aug
(3) |
Sep
(23) |
Oct
(11) |
Nov
(17) |
Dec
(12) |
2016 |
Jan
(20) |
Feb
(27) |
Mar
(20) |
Apr
(40) |
May
(35) |
Jun
(48) |
Jul
(44) |
Aug
(51) |
Sep
(18) |
Oct
(42) |
Nov
(39) |
Dec
(29) |
2017 |
Jan
(37) |
Feb
(34) |
Mar
(20) |
Apr
(37) |
May
(10) |
Jun
(2) |
Jul
(14) |
Aug
(15) |
Sep
(25) |
Oct
(29) |
Nov
(15) |
Dec
(29) |
2018 |
Jan
(5) |
Feb
(15) |
Mar
(6) |
Apr
(20) |
May
(39) |
Jun
(39) |
Jul
(17) |
Aug
(20) |
Sep
(10) |
Oct
(17) |
Nov
(20) |
Dec
(8) |
2019 |
Jan
(28) |
Feb
(21) |
Mar
(13) |
Apr
(44) |
May
(44) |
Jun
(28) |
Jul
(51) |
Aug
(30) |
Sep
(7) |
Oct
(20) |
Nov
(8) |
Dec
(21) |
2020 |
Jan
(27) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Vlad S. <ser...@us...> - 2005-11-02 21:18:30
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15489/nsd Modified Files: binder.c nsmain.c Log Message: Index: binder.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/binder.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** binder.c 8 Oct 2005 12:06:07 -0000 1.13 --- binder.c 2 Nov 2005 21:18:20 -0000 1.14 *************** *** 38,45 **** #ifndef _WIN32 ! # include <sys/un.h> #endif ! NS_RCSID("@(#) $Header$"); /* --- 38,64 ---- #ifndef _WIN32 ! #include <sys/un.h> ! #include <sys/uio.h> #endif ! #ifdef HAVE_CMMSG ! ! /* ! * Some platforms use BSD4.4 style message passing. This structure is used ! * to pass the file descriptor between parent and slave. Note that ! * the first 3 elements must match those of the struct cmsghdr. ! */ ! ! typedef struct CMsg { ! unsigned int len; ! int level; ! int type; ! int fds[1]; ! } CMsg; ! ! #endif ! ! #define REQUEST_SIZE (sizeof(int) + sizeof(int) + sizeof(int) + 64) ! #define RESPONSE_SIZE (sizeof(int)) /* *************** *** 47,55 **** */ static Tcl_HashTable preboundTcp; static Tcl_HashTable preboundUdp; static Tcl_HashTable preboundRaw; static Tcl_HashTable preboundUnix; ! static Ns_Mutex lock; /* --- 66,78 ---- */ + static Ns_Mutex lock; static Tcl_HashTable preboundTcp; static Tcl_HashTable preboundUdp; static Tcl_HashTable preboundRaw; static Tcl_HashTable preboundUnix; ! ! static int binderRunning; ! static int binderRequest[2]; ! static int binderResponse[2]; /* *************** *** 58,61 **** --- 81,87 ---- static void PreBind(char *line); + static void Binder(void); + + NS_RCSID("@(#) $Header$"); *************** *** 685,686 **** --- 711,1028 ---- #endif } + + /* + *---------------------------------------------------------------------- + * + * Ns_SockBinder -- + * + * Create a new TCP/UDP/Unix socket bound to the specified port and + * listening for new connections. + * + * The following types are defined: + * T - TCP socket + * U - UDP socket + * D - Unix domain socket + * R - raw socket + * + * Results: + * Socket descriptor or -1 on error. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + SOCKET + Ns_SockBinderListen(int type, char *address, int port, int options) + { + int err; + SOCKET sock; + char data[64]; + struct msghdr msg; + struct iovec iov[4]; + #ifdef HAVE_CMMSG + CMsg cm; + #endif + + if (address == NULL) { + address = "0.0.0.0"; + } + iov[0].iov_base = (caddr_t) &options; + iov[0].iov_len = sizeof(options); + iov[1].iov_base = (caddr_t) &port; + iov[1].iov_len = sizeof(port); + iov[2].iov_base = (caddr_t) &type; + iov[2].iov_len = sizeof(type); + iov[3].iov_base = (caddr_t) data; + iov[3].iov_len = sizeof(data); + memset(data, 0, sizeof(data)); + strncpy(data, address, sizeof(data)-1); + memset(&msg, 0, sizeof(msg)); + msg.msg_iov = iov; + msg.msg_iovlen = 4; + if (sendmsg(binderRequest[1], (struct msghdr *) &msg, 0) != REQUEST_SIZE) { + Ns_Log(Error, "Ns_SockBinderListen: sendmsg() failed: '%s'", strerror(errno)); + return -1; + } + + iov[0].iov_base = (caddr_t) &err; + iov[0].iov_len = sizeof(int); + memset(&msg, 0, sizeof(msg)); + msg.msg_iov = iov; + msg.msg_iovlen = 1; + #ifdef HAVE_CMMSG + cm.len = sizeof(cm); + cm.type = SCM_RIGHTS; + cm.level = SOL_SOCKET; + msg.msg_control = (void *) &cm; + msg.msg_controllen = cm.len; + msg.msg_flags = 0; + #else + msg.msg_accrights = (caddr_t) &sock; + msg.msg_accrightslen = sizeof(sock); + #endif + if (recvmsg(binderResponse[0], (struct msghdr *) &msg, 0) != RESPONSE_SIZE) { + Ns_Log(Error, "Ns_SockBinderListen: recvmsg() failed: '%s'", strerror(errno)); + return -1; + } + #ifdef HAVE_CMMSG + sock = cm.fds[0]; + #endif + + /* + * Close-on-exec, while set in the binder process by default + * with Ns_SockBind, is not transmitted in the sendmsg and + * must be set again. + */ + + if (sock != INVALID_SOCKET && Ns_CloseOnExec(sock) != NS_OK) { + close(sock); + sock = -1; + } + if (address == NULL) { + address = "0.0.0.0"; + } + if (err == 0) { + Ns_Log(Notice, "Ns_SockBinderListen: listen(%s,%d) = %d", address, port, sock); + } else { + Ns_SetSockErrno(err); + sock = -1; + Ns_Log(Error, "Ns_SockBinderListen: listen(%s,%d) failed: '%s'", + address, port, ns_sockstrerror(ns_sockerrno)); + } + return sock; + } + + /* + *---------------------------------------------------------------------- + * + * NsForkBinder -- + * + * Fork of the slave bind/listen process. This routine is called + * by main() when the server starts as root. + * + * Results: + * None. + * + * Side effects: + * The binderRunning, binderRequest, binderResponse static variables + * are updated. + * + *---------------------------------------------------------------------- + */ + + void + NsForkBinder(void) + { + int pid, status; + + /* + * Create two socket pipes, one for sending the request and one + * for receiving the response. + */ + + if (ns_sockpair(binderRequest) != 0 || ns_sockpair(binderResponse) != 0) { + Ns_Fatal("binder: ns_sockpair() failed: '%s'", strerror(errno)); + } + + /* + * Double-fork and run as a binder until the socket pairs are + * closed. The server double forks to avoid problems + * waiting for a child root process after the parent does a + * setuid(), something which appears to confuse the + * process-based Linux and SGI threads. + */ + + pid = ns_fork(); + if (pid < 0) { + Ns_Fatal("binder: fork() failed: '%s'", strerror(errno)); + } else if (pid == 0) { + pid = ns_fork(); + if (pid < 0) { + Ns_Fatal("binder: fork() failed: '%s'", strerror(errno)); + } else if (pid == 0) { + close(binderRequest[1]); + close(binderResponse[0]); + Binder(); + } + exit(0); + } + if (Ns_WaitForProcess(pid, &status) != NS_OK) { + Ns_Fatal("binder: Ns_WaitForProcess(%d) failed: '%s'", + pid, strerror(errno)); + } else if (status != 0) { + Ns_Fatal("binder: process %d exited with non-zero status: %d", + pid, status); + } + Ns_MutexLock(&lock); + binderRunning = 1; + Ns_MutexUnlock(&lock); + } + + + /* + *---------------------------------------------------------------------- + * + * NsStopBinder -- + * + * Close the socket to the binder after startup. This is done + * to avoid a possible security risk of binding to privileged + * ports after startup. + * + * Results: + * None. + * + * Side effects: + * Binder process will exit. + * + *---------------------------------------------------------------------- + */ + + void + NsStopBinder(void) + { + if (binderRunning) { + close(binderRequest[1]); + close(binderResponse[0]); + close(binderRequest[0]); + close(binderResponse[1]); + binderRunning = 0; + } + } + + /* + *---------------------------------------------------------------------- + * + * Binder -- + * + * Slave process bind/listen loop. + * + * Results: + * None. + * + * Side effects: + * Sockets are created and sent to the parent on request. + * + *---------------------------------------------------------------------- + */ + + static void + Binder(void) + { + int n, err, fd; + char address[64]; + struct msghdr msg; + struct iovec iov[4]; + int options, type, port; + #ifdef HAVE_CMMSG + CMsg cm; + #endif + + /* + * Endlessly listen for socket bind requests. + */ + + for (;;) { + iov[0].iov_base = (caddr_t) &options; + iov[0].iov_len = sizeof(options); + iov[1].iov_base = (caddr_t) &port; + iov[1].iov_len = sizeof(port); + iov[2].iov_base = (caddr_t) &type; + iov[2].iov_len = sizeof(type); + iov[3].iov_base = (caddr_t) address; + iov[3].iov_len = sizeof(address); + memset(&msg, 0, sizeof(msg)); + msg.msg_iov = iov; + msg.msg_iovlen = 4; + type = 0; + err = 0; + do { + n = recvmsg(binderRequest[0], (struct msghdr *) &msg, 0); + } while (n == -1 && errno == EINTR); + if (n == 0) { + break; + } + if (n != REQUEST_SIZE) { + Ns_Fatal("binder: recvmsg() failed: '%s'", strerror(errno)); + } + + /* + * NB: Due to a bug in Solaris the slave process must + * call both bind() and listen() before returning the + * socket. All other Unix versions would actually allow + * just performing the bind() in the slave and allowing + * the parent to perform the listen(). + */ + switch (type) { + case 'U': + fd = Ns_SockListenUdp(address, port); + break; + case 'D': + fd = Ns_SockListenUnix(address, options); + break; + case 'R': + fd = Ns_SockListenRaw(options); + break; + case 'T': + default: + fd = Ns_SockListenEx(address, port, options); + } + if (fd < 0) err = errno; + + iov[0].iov_base = (caddr_t) &err; + iov[0].iov_len = sizeof(err); + memset(&msg, 0, sizeof(msg)); + msg.msg_iov = iov; + msg.msg_iovlen = 1; + if (fd != -1) { + #ifdef HAVE_CMMSG + cm.len = sizeof(cm); + cm.level = SOL_SOCKET; + cm.type = SCM_RIGHTS; + cm.fds[0] = fd; + msg.msg_control = (void *) &cm; + msg.msg_controllen = cm.len; + msg.msg_flags = 0; + #else + msg.msg_accrights = (caddr_t) &fd; + msg.msg_accrightslen = sizeof(fd); + #endif + } + do { + n = sendmsg(binderResponse[1], (struct msghdr *) &msg, 0); + } while (n == -1 && errno == EINTR); + if (n != RESPONSE_SIZE) { + Ns_Fatal("binder: sendmsg() failed: '%s'", strerror(errno)); + } + if (fd != -1) { + + /* + * Close the socket as it won't be needed in the slave. + */ + + close(fd); + } + } + } Index: nsmain.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsmain.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** nsmain.c 22 Oct 2005 09:31:36 -0000 1.26 --- nsmain.c 2 Nov 2005 21:18:20 -0000 1.27 *************** *** 526,529 **** --- 526,537 ---- Ns_Fatal("nsmain: setgid(%d) failed: '%s'", gid, strerror(errno)); } + + /* + * Before setuid, fork the background binder process to + * listen on ports which were not pre-bound above. + */ + + NsForkBinder(); + if (setuid((uid_t)uid) != 0) { Ns_Fatal("nsmain: setuid(%d) failed: '%s'", uid, strerror(errno)); *************** *** 727,730 **** --- 735,739 ---- #ifndef _WIN32 NsClosePreBound(); + NsStopBinder(); #endif |
From: Vlad S. <ser...@us...> - 2005-11-02 20:20:30
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4037 Modified Files: ChangeLog Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.240 retrieving revision 1.241 diff -C2 -d -r1.240 -r1.241 *** ChangeLog 28 Oct 2005 16:00:58 -0000 1.240 --- ChangeLog 2 Nov 2005 20:20:22 -0000 1.241 *************** *** 1,2 **** --- 1,7 ---- + 2005-11-02 Vlad Seryakov <ser...@us...> + + * tests/ns_info.test: added 1 second delay to make ns_info + uptime report uptie > 0 + 2005-10-28 Bernd Eidenschink <ei...@us...> |
From: Vlad S. <ser...@us...> - 2005-11-02 20:19:33
|
Update of /cvsroot/naviserver/naviserver/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3700 Modified Files: ns_info.test Log Message: Index: ns_info.test =================================================================== RCS file: /cvsroot/naviserver/naviserver/tests/ns_info.test,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ns_info.test 21 Oct 2005 07:38:38 -0000 1.2 --- ns_info.test 2 Nov 2005 20:19:24 -0000 1.3 *************** *** 140,143 **** --- 140,144 ---- test ns_info-2.28.1 {basic operation} -body { + ns_sleep 1 expr {[ns_info uptime]>1} } -result 1 |
From: Bernd E. <ei...@us...> - 2005-10-28 16:01:07
|
Update of /cvsroot/naviserver/naviserver/tcl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21852/tcl Modified Files: compat.tcl Log Message: see ChangeLog Index: compat.tcl =================================================================== RCS file: /cvsroot/naviserver/naviserver/tcl/compat.tcl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** compat.tcl 21 Oct 2005 10:07:58 -0000 1.4 --- compat.tcl 28 Oct 2005 16:00:58 -0000 1.5 *************** *** 195,198 **** --- 195,200 ---- if {[file type $from] != [file type $to]} { error "rename (\"$from\", \"$to\"): not of the same type" + } elseif {$from == $to} { + error "error renaming \"$from\": file already exists" } file delete $to |
From: Bernd E. <ei...@us...> - 2005-10-28 16:01:07
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21852 Modified Files: ChangeLog Log Message: see ChangeLog Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.239 retrieving revision 1.240 diff -C2 -d -r1.239 -r1.240 *** ChangeLog 27 Oct 2005 10:34:26 -0000 1.239 --- ChangeLog 28 Oct 2005 16:00:58 -0000 1.240 *************** *** 1,2 **** --- 1,7 ---- + 2005-10-28 Bernd Eidenschink <ei...@us...> + + * tcl/compat.tcl: ns_rename now does not delete a file + if "from" and "to" match. + 2005-10-27 Zoran Vasiljevic <vas...@us...> |
From: Zoran V. <vas...@us...> - 2005-10-27 10:34:39
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18637/include Modified Files: ns.h Log Message: Added Ns_VALog with varargs interface Index: ns.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/ns.h,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** ns.h 21 Oct 2005 06:22:14 -0000 1.55 --- ns.h 27 Oct 2005 10:34:27 -0000 1.56 *************** *** 1111,1114 **** --- 1111,1117 ---- NS_EXTERN void + Ns_VALog(Ns_LogSeverity severity, CONST char *fmt, va_list *vaPtr); + + NS_EXTERN void Ns_Fatal(CONST char *fmt, ...) NS_GNUC_PRINTF(1, 2) NS_GNUC_NORETURN; |
From: Zoran V. <vas...@us...> - 2005-10-27 10:34:39
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18637 Modified Files: ChangeLog Log Message: Added Ns_VALog with varargs interface Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.238 retrieving revision 1.239 diff -C2 -d -r1.238 -r1.239 *** ChangeLog 24 Oct 2005 16:08:58 -0000 1.238 --- ChangeLog 27 Oct 2005 10:34:26 -0000 1.239 *************** *** 1,2 **** --- 1,7 ---- + 2005-10-27 Zoran Vasiljevic <vas...@us...> + + * include/ns.h: + * nsd/log.c: added Ns_VALog with varargs interface + 2005-10-24 Bernd Eidenschink <ei...@us...> |
From: Zoran V. <vas...@us...> - 2005-10-27 10:34:39
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18637/nsd Modified Files: log.c Log Message: Added Ns_VALog with varargs interface Index: log.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/log.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** log.c 17 Oct 2005 11:43:58 -0000 1.11 --- log.c 27 Oct 2005 10:34:27 -0000 1.12 *************** *** 286,289 **** --- 286,311 ---- va_end(ap); } + + /* + *---------------------------------------------------------------------- + * + * Ns_VALog -- + * + * Send a message to the server log (varargs interface) + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + void + Ns_VALog(Ns_LogSeverity severity, CONST char *fmt, va_list *vaPtr) + { + Log(severity, fmt, *vaPtr); + } |
From: Bernd E. <ei...@us...> - 2005-10-24 16:09:11
|
Update of /cvsroot/naviserver/naviserver/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3136/tests Added Files: ns_set.test Log Message: see Changelog --- NEW FILE: ns_set.test --- # # $Header: /cvsroot/naviserver/naviserver/tests/ns_set.test,v 1.1 2005/10/24 16:08:58 eide Exp $ # package require tcltest 2.2 namespace import -force ::tcltest::* test ns_set-1.1 {basic syntax ns_set} -body { ns_set } -returnCodes error -result {wrong # args: should be "ns_set option ?arg ...?"} test ns_set-1.2 {basic syntax ns_set} -body { ns_set 123 } -returnCodes error -result {bad option "123": must be array, cleanup, copy, cput, create, delete, delkey, find, free, get, icput, idelete, idelkey, ifind, iget, isnull, iunique, key, list, merge, move, name, new, print, purge, put, size, split, truncate, unique, update, or value} test ns_set-1.6 {basic syntax ns_set array} -body { ns_set array } -returnCodes error -result {wrong # args: should be "ns_set array setId ?args?"} test ns_set-1.7 {basic syntax ns_set cleanup} -body { ns_set cleanup } -result {} test ns_set-1.8 {basic syntax ns_set copy} -body { ns_set copy } -returnCodes error -result {wrong # args: should be "ns_set copy ?-shared? setId"} test ns_set-1.9 {basic syntax ns_set cput} -body { ns_set cput } -returnCodes error -result {wrong # args: should be "ns_set cput setId ?args?"} test ns_set-1.10 {basic syntax ns_set create} -body { expr {[ns_set create] ne ""} } -result 1 -cleanup { ns_set cleanup } test ns_set-1.11 {basic syntax ns_set delete} -body { ns_set delete } -returnCodes error -result {wrong # args: should be "ns_set delete setId ?args?"} test ns_set-1.12 {basic syntax ns_set delkey} -body { ns_set delkey } -returnCodes error -result {wrong # args: should be "ns_set delkey setId ?args?"} test ns_set-1.13 {basic syntax ns_set find} -body { ns_set find } -returnCodes error -result {wrong # args: should be "ns_set find setId ?args?"} test ns_set-1.14 {basic syntax ns_set free} -body { ns_set free } -returnCodes error -result {wrong # args: should be "ns_set free setId ?args?"} test ns_set-1.15 {basic syntax ns_set get} -body { ns_set get } -returnCodes error -result {wrong # args: should be "ns_set get setId ?args?"} test ns_set-1.16 {basic syntax ns_set icput} -body { ns_set icput } -returnCodes error -result {wrong # args: should be "ns_set icput setId ?args?"} test ns_set-1.17 {basic syntax ns_set idelete} -body { ns_set idelete } -returnCodes error -result {wrong # args: should be "ns_set idelete setId ?args?"} test ns_set-1.18 {basic syntax ns_set idelkey} -body { ns_set idelkey } -returnCodes error -result {wrong # args: should be "ns_set idelkey setId ?args?"} test ns_set-1.19 {basic syntax ns_set ifind} -body { ns_set ifind } -returnCodes error -result {wrong # args: should be "ns_set ifind setId ?args?"} test ns_set-1.20 {basic syntax ns_set iget} -body { ns_set iget } -returnCodes error -result {wrong # args: should be "ns_set iget setId ?args?"} test ns_set-1.21 {basic syntax ns_set isnull} -body { ns_set isnull } -returnCodes error -result {wrong # args: should be "ns_set isnull setId ?args?"} test ns_set-1.22 {basic syntax ns_set iunique} -body { ns_set iunique } -returnCodes error -result {wrong # args: should be "ns_set iunique setId ?args?"} test ns_set-1.23 {basic syntax ns_set key } -body { ns_set key } -returnCodes error -result {wrong # args: should be "ns_set key setId ?args?"} test ns_set-1.24 {basic syntax ns_set list} -body { ns_set list } -result "" test ns_set-1.25 {basic syntax ns_set merge} -body { ns_set merge } -returnCodes error -result {wrong # args: should be "ns_set merge setId ?args?"} test ns_set-1.26 {basic syntax ns_set move} -body { ns_set move } -returnCodes error -result {wrong # args: should be "ns_set move setId ?args?"} test ns_set-1.27 {basic syntax ns_set name} -body { ns_set name } -returnCodes error -result {wrong # args: should be "ns_set name setId ?args?"} test ns_set-1.28 {basic syntax ns_set new} -body { expr {[ns_set new] ne ""} } -result 1 -cleanup { ns_set cleanup } test ns_set-1.29 {basic syntax ns_set pri} -body { ns_set print } -returnCodes error -result {wrong # args: should be "ns_set print setId ?args?"} test ns_set-1.30 {basic syntax ns_set purge} -body { ns_set purge } -returnCodes error -result {wrong # args: should be "ns_set purge setId ?args?"} test ns_set-1.31 {basic syntax ns_set put} -body { ns_set put } -returnCodes error -result {wrong # args: should be "ns_set put setId ?args?"} test ns_set-1.32 {basic syntax ns_set size} -body { ns_set size } -returnCodes error -result {wrong # args: should be "ns_set size setId ?args?"} test ns_set-1.33 {basic syntax ns_set split} -body { ns_set split } -returnCodes error -result {wrong # args: should be "ns_set split ?-shared? setId ?splitChar"} test ns_set-1.34 {basic syntax ns_set truncate} -body { ns_set truncate } -returnCodes error -result {wrong # args: should be "ns_set truncate setId ?args?"} test ns_set-1.35 {basic syntax ns_set unique} -body { ns_set unique } -returnCodes error -result {wrong # args: should be "ns_set unique setId ?args?"} test ns_set-1.36 {basic syntax ns_set update} -body { ns_set update } -returnCodes error -result {wrong # args: should be "ns_set update setId ?args?"} test ns_set-1.37 {basic syntax ns_set value} -body { ns_set value } -returnCodes error -result {wrong # args: should be "ns_set value setId ?args?"} test ns_set-2.0 {basic operation ns_set} -body { ns_set cleanup ns_set create; ns_set create; ns_set create ns_set cleanup ns_set list } -result "" test ns_set-2.1 {basic operation ns_set} -body { ns_set array [ns_set create testset foo bar moo baz] } -result [list foo bar moo baz] -cleanup { ns_set cleanup } test ns_set-2.2 {basic operation ns_set} -body { ns_set size [ns_set create testset foo bar moo baz] } -result 2 -cleanup { ns_set cleanup } test ns_set-2.3 {basic operation ns_set} -body { ns_set name [ns_set create tEsTsEt foo bar moo baz] } -result tEsTsEt -cleanup { ns_set cleanup } test ns_set-2.4 {basic operation ns_set} -body { set setid [ns_set create testset foo bar moo baz] ns_set get $setid moo } -result baz -cleanup { ns_set cleanup } test ns_set-2.5 {basic operation ns_set} -body { set setid [ns_set create testset A 1 B 2 a 3 b 4] ns_set iget $setid a } -result 1 -cleanup { ns_set cleanup } test ns_set-2.6 {basic operation ns_set} -body { set setid [ns_set create testset A 1 B 2 a 3 b 4] ns_set unique $setid a } -result 1 -cleanup { ns_set cleanup } test ns_set-2.7 {basic operation ns_set} -body { set setid [ns_set create testset A 1 B 2 a 3 b 4] ns_set iunique $setid a } -result 0 -cleanup { ns_set cleanup } test ns_set-2.8 {basic operation ns_set} -body { set x [ns_set create testset foo bar moo baz] ns_set truncate $x 1 ns_set get $x foo } -result bar -cleanup { ns_set cleanup } test ns_set-2.9 {basic operation ns_set} -body { set x [ns_set create testset foo bar moo baz] ns_set truncate $x 1 ns_set get $x moo } -result "" -cleanup { ns_set cleanup } test ns_set-2.10 {basic operation ns_set} -body { set x [ns_set create testset . 0 a 1 b 2 c 3 d 4 e 5 f 6 e 7 g 8] ns_set find $x e } -result 5 -cleanup { ns_set cleanup } test ns_set-2.11 {basic operation ns_set} -body { set x [ns_set create testset . 0 a 1 b 2 c 3 d 4 e 5 f 6 e 7 g 8] ns_set find $x lala } -result -1 -cleanup { ns_set cleanup } test ns_set-2.12 {basic operation ns_set} -body { set x [ns_set create testset . 0 a 1 b 2 c 3 d 4 e 5 f 6 e 7 g 8] ns_set delete $x 8 } -result "" -cleanup { ns_set cleanup } test ns_set-2.13 {basic operation ns_set} -body { set x [ns_set create testset . 0 a 1 b 2 c 3 d 4 e 5 f 6 e 7 g 8] ns_set delete $x 8 ns_set get $x 8 } -result "" -cleanup { ns_set cleanup } test ns_set-2.14 {basic operation ns_set} -body { set x [ns_set create testset foo bar] ns_set update $x a b ns_set update $x c d ns_set update $x e f } -result 3 -cleanup { ns_set cleanup } test ns_set-2.15 {basic operation ns_set} -body { set x [ns_set create testset foo bar] ns_set update $x a b ns_set update $x c d ns_set update $x e f ns_set get $x e } -result f -cleanup { ns_set cleanup } test ns_set-2.16 {basic operation ns_set} -body { ns_set create; ns_set create; ns_set create; ns_set create; ns_set create llength [lsort -unique [ns_set list]] } -result 5 -cleanup { ns_set cleanup } test ns_set-2.17 {basic operation ns_set} -body { set x [ns_set create] ns_set put $x foo bar ns_set put $x foo bar ns_set put $x foo bar } -result 2 -cleanup { ns_set cleanup } test ns_set-2.18 {basic operation ns_set} -body { set x [ns_set create] ns_set put $x foo bar ns_set put $x foo bar ns_set put $x foo bar ns_set array $x } -result [list foo bar foo bar foo bar] -cleanup { ns_set cleanup } test ns_set-2.19 {basic operation ns_set} -body { set x [ns_set create] ns_set put $x content.type ba1 ns_set put $x content.encoding ba2 ns_set put $x content.length ba3 ns_set split $x "." ns_set list } -result [list d0 d1] -cleanup { ns_set cleanup } test ns_set-2.20 {basic operation ns_set} -body { set x [ns_set create] ns_set put $x the.key the.value ns_set key $x 0 } -result "the.key" -cleanup { ns_set cleanup } test ns_set-2.21 {basic operation ns_set} -body { set x [ns_set create] ns_set put $x the.key the.value ns_set value $x 0 } -result "the.value" -cleanup { ns_set cleanup } test ns_set-2.22 {basic operation ns_set} -body { set x [ns_set create] set y [ns_set create] ns_set put $x and now ns_set put $y the larch ns_set merge $x $y ns_set get $x the } -result "larch" -cleanup { ns_set cleanup } test ns_set-2.23 {basic operation ns_set} -body { set x [ns_set create firstset and now] set y [ns_set create secondset the larch] set newsetid [ns_set move $x $y] ns_set get $newsetid the } -result "larch" -cleanup { ns_set cleanup } test ns_set-2.24 {basic operation ns_set} -body { set x [ns_set create firstset a 1] ns_set cput $x a 1 } -result 0 -cleanup { ns_set cleanup } test ns_set-2.25 {basic operation ns_set} -body { set x [ns_set create firstset a 1] ns_set cput $x a 2 ns_set value $x 0 } -result 1 -cleanup { ns_set cleanup } test ns_set-2.26 {basic operation ns_set} -body { set x [ns_set create firstset a 1] ns_set icput $x A 2 ns_set value $x 0 } -result 1 -cleanup { ns_set cleanup } test ns_set-2.27 {basic operation ns_set} -body { set x [ns_set create firstset a 1] ns_set icput $x B 2 } -result 1 -cleanup { ns_set cleanup } test ns_set-2.28 {basic operation ns_set} -body { set x [ns_set create firstset a 1] ns_set icput $x B 2 ns_set value $x 1 } -result 2 -cleanup { ns_set cleanup } test ns_set-2.29 {basic operation ns_set} -body { set x [ns_set create firstset a 1] ns_set free $x ns_set get $x 0 } -returnCodes error -result {no such set: d0} -cleanup { ns_set cleanup } cleanupTests |
From: Bernd E. <ei...@us...> - 2005-10-24 16:09:06
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3136 Modified Files: ChangeLog Log Message: see Changelog Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.237 retrieving revision 1.238 diff -C2 -d -r1.237 -r1.238 *** ChangeLog 22 Oct 2005 12:50:39 -0000 1.237 --- ChangeLog 24 Oct 2005 16:08:58 -0000 1.238 *************** *** 1,2 **** --- 1,6 ---- + 2005-10-24 Bernd Eidenschink <ei...@us...> + + * tests/ns_set.test: added basic tests for ns_set command. + 2005-10-22 Stephen Deasey <sd...@us...> |
From: Stephen D. <sd...@us...> - 2005-10-22 12:50:51
|
Update of /cvsroot/naviserver/naviserver/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5911/tests Modified Files: ns_env.test Log Message: * nsd/tclcmds.c: * nsd/tclenv.c: * tests/ns_env.test: Untabify and reformat code, convert to Tcl objects. Fix bugs with -nocomplain switch and unset command. (Bug# 1333280) Index: ns_env.test =================================================================== RCS file: /cvsroot/naviserver/naviserver/tests/ns_env.test,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ns_env.test 20 Oct 2005 17:02:45 -0000 1.1 --- ns_env.test 22 Oct 2005 12:50:39 -0000 1.2 *************** *** 8,63 **** eval ::tcltest::configure $argv test ns_env-1.1 {basic syntax} -body { ns_env ! } -returnCodes error -result {wrong # args: should be "ns_env command ?args ...?"} test ns_env-1.2 {basic syntax} -body { ! ns_env 123 ! } -returnCodes error -result {unknown command "123": should be exists, names, get, set, or unset} test ns_env-1.3 {basic syntax} -body { ns_env get ! } -returnCodes error -result {wrong # args: should be "ns_env get ?-nocomplain? name"} ! test ns_env-2.1 {basic operation: set, exists} -setup { ! ns_env set foo bar ! } -body { ! ns_env exists foo } -cleanup { ! ns_env unset foo } -result 1 ! test ns_env-2.2 {basic operation: set, get} -setup { ! ns_env set foo bar ! } -body { ! ns_env get foo } -cleanup { ! ns_env unset foo ! } -result "bar" ! test ns_env-2.3 {basic operation: unset} -setup { ! ns_env set foo bar ! } -body { ! ns_env unset foo ! ns_env exists foo } -result 0 ! test ns_env-2.4 {basic operation: names} -setup { ! ns_env set zhzhzhzh bar ! } -body { ! expr {[lsearch -exact [ns_env names] "zhzhzhzh"]>-1} } -result 1 ! test ns_env-2.5 {basic operation: get -nocomplain} -body { ! # note that this throws an error but the test case ! # tests the implied behaviour ! ns_env get -nocomplain NXNXNXNX } -result "" - test ns_env-2.6 {basic operation: get} -body { - # note that the test case expects the implied behaviour - ns_env get NXNXNXNX - } -returnCodes error -result {no such environment variable: NXNXNXNX} --- 8,78 ---- eval ::tcltest::configure $argv + + test ns_env-1.1 {basic syntax} -body { ns_env ! } -returnCodes error -result {wrong # args: should be "ns_env command ?args ...?"} test ns_env-1.2 {basic syntax} -body { ! ns_env ? ! } -returnCodes error -result {bad command "?": must be exists, names, get, set, or unset} test ns_env-1.3 {basic syntax} -body { + ns_env exists + } -returnCodes error -result {wrong # args: should be "ns_env exists name"} + + test ns_env-1.4 {basic syntax} -body { ns_env get ! } -returnCodes error -result {wrong # args: should be "ns_env get ?-nocomplain? name"} + test ns_env-1.5 {basic syntax} -body { + ns_env set + } -returnCodes error -result {wrong # args: should be "ns_env set name value"} ! test ns_env-1.6 {basic syntax} -body { ! ns_env unset ! } -returnCodes error -result {wrong # args: should be "ns_env unset ?-nocomplain? name"} ! ! ! ! test ns_env-2.1 {names} -body { ! ns_env set NSTEST X ! expr {[lsearch -exact [ns_env names] NSTEST] > -1} } -cleanup { ! ns_env unset NSTEST } -result 1 ! test ns_env-2.2 {set, get} -body { ! ns_env set NSTEST X ! ns_env get NSTEST } -cleanup { ! ns_env unset NSTEST ! } -result X ! test ns_env-2.5 {unset} -body { ! ns_env set NSTEST X ! ns_env unset NSTEST ! ns_env exists NSTEST } -result 0 ! test ns_env-2.3 {exists, yes} -body { ! ns_env set NSTEST X ! ns_env exists NSTEST ! } -cleanup { ! ns_env unset NSTEST } -result 1 ! test ns_env-2.4 {exists, no} -body { ! ns_env exists NSTEST_NOEXIST ! } -result 0 ! ! test ns_env-2.6 {get non existing variable} -body { ! ns_env get NSTEST_NOEXIST ! } -returnCodes error -result {no such environment variable} ! ! test ns_env-2.7 {get non existing variable without complaint} -body { ! ns_env get -nocomplain NSTEST_NOEXIST } -result "" |
From: Stephen D. <sd...@us...> - 2005-10-22 12:50:51
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5911/nsd Modified Files: tclcmds.c tclenv.c Log Message: * nsd/tclcmds.c: * nsd/tclenv.c: * tests/ns_env.test: Untabify and reformat code, convert to Tcl objects. Fix bugs with -nocomplain switch and unset command. (Bug# 1333280) Index: tclcmds.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclcmds.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** tclcmds.c 21 Oct 2005 10:07:26 -0000 1.23 --- tclcmds.c 22 Oct 2005 12:50:39 -0000 1.24 *************** *** 79,82 **** --- 79,83 ---- NsTclDeleteCookieObjCmd, NsTclDummyObjCmd, + NsTclEnvObjCmd, NsTclFTruncateObjCmd, NsTclGetAddrObjCmd, *************** *** 198,202 **** NsTclConfigSectionsCmd, NsTclEncodingForCharsetCmd, - NsTclEnvCmd, NsTclHrefsCmd, NsTclLibraryCmd, --- 199,202 ---- *************** *** 229,233 **** static Cmd basicCmds[] = { ! {"env", NsTclEnvCmd, NULL}, {"keyldel", TclX_KeyldelObjCmd, NULL}, {"keylget", TclX_KeylgetObjCmd, NULL}, --- 229,233 ---- static Cmd basicCmds[] = { ! {"env", NULL, NsTclEnvObjCmd}, {"keyldel", TclX_KeyldelObjCmd, NULL}, {"keylget", TclX_KeylgetObjCmd, NULL}, *************** *** 258,262 **** {"ns_crypt", NULL, NsTclCryptObjCmd}, {"ns_encodingforcharset", NsTclEncodingForCharsetCmd, NULL}, ! {"ns_env", NsTclEnvCmd, NULL}, {"ns_event", NULL, NsTclCondObjCmd}, {"ns_ftruncate", NULL, NsTclFTruncateObjCmd}, --- 258,262 ---- {"ns_crypt", NULL, NsTclCryptObjCmd}, {"ns_encodingforcharset", NsTclEncodingForCharsetCmd, NULL}, ! {"ns_env", NULL, NsTclEnvObjCmd}, {"ns_event", NULL, NsTclCondObjCmd}, {"ns_ftruncate", NULL, NsTclFTruncateObjCmd}, Index: tclenv.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclenv.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tclenv.c 10 Jun 2005 17:58:40 -0000 1.2 --- tclenv.c 22 Oct 2005 12:50:39 -0000 1.3 *************** *** 32,36 **** * tclenv.c -- * ! * Implement the "ns_env" command. */ --- 32,36 ---- * tclenv.c -- * ! * Implement the "ns_env" command. */ *************** *** 40,45 **** - static int PutEnv(Tcl_Interp *interp, char *name, char *value); - static Ns_Mutex lock; #ifdef HAVE__NSGETENVIRON #include <crt_externs.h> --- 40,43 ---- *************** *** 48,51 **** --- 46,91 ---- #endif + /* + * Local functions defined in this file. + */ + + static int PutEnv(Tcl_Interp *interp, char *name, char *value); + + /* + * Loca variables defined in this file. + */ + + static Ns_Mutex lock; + + + /* + *---------------------------------------------------------------------- + * + * Ns_GetEnviron -- + * + * Return the environment vector. + * + * Results: + * Pointer to environment. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + char ** + Ns_GetEnviron(void) + { + char **envp; + + #ifdef HAVE__NSGETENVIRON + envp = *_NSGetEnviron(); + #else + envp = environ; + #endif + return envp; + } + /* *************** *** 54,65 **** * Ns_CopyEnviron -- * ! * Copy the environment to the given dstring along with ! * an argv vector. * * Results: ! * Pointer to dsPtr->string. * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 94,105 ---- * Ns_CopyEnviron -- * ! * Copy the environment to the given dstring along with ! * an argv vector. * * Results: ! * Pointer to dsPtr->string. * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 75,81 **** envp = Ns_GetEnviron(); for (i = 0; (s = envp[i]) != NULL; ++i) { ! Ns_DStringAppendArg(dsPtr, s); } Ns_MutexUnlock(&lock); return Ns_DStringAppendArgv(dsPtr); } --- 115,122 ---- envp = Ns_GetEnviron(); for (i = 0; (s = envp[i]) != NULL; ++i) { ! Ns_DStringAppendArg(dsPtr, s); } Ns_MutexUnlock(&lock); + return Ns_DStringAppendArgv(dsPtr); } *************** *** 87,101 **** * NsTclEnvCmd -- * ! * Implement the "env" command. Read the code to see what it does. ! * NOTE: The getenv() and putenv() routines are assumed MT safe ! * and there's no attempt to avoid the race condition between ! * finding a variable and using it. The reason is it's assumed ! * the environment would only be modified, if ever, at startup. * * Results: ! * A standard Tcl result. * * Side effects: ! * Environment variables may be updated. * *---------------------------------------------------------------------- --- 128,141 ---- * NsTclEnvCmd -- * ! * Implements the ns_env command. No attempt is made to avoid the ! * race condition between finding a variable and using it as it is ! * assumed the environment would only be modified, if ever, at ! * startup. * * Results: ! * Tcl result. * * Side effects: ! * Environment variables may be updated. * *---------------------------------------------------------------------- *************** *** 103,195 **** int ! NsTclEnvCmd(ClientData dummy, Tcl_Interp *interp, int argc, char **argv) { ! char *name, *value, **envp; ! int status, i; ! Tcl_DString ds; ! if (argc < 2) { ! Tcl_AppendResult(interp, "wrong # args: should be \"", ! argv[0], " command ?args ...?\"", NULL); ! return TCL_ERROR; } ! status = TCL_OK; Ns_MutexLock(&lock); - if (STREQ(argv[1], "names")) { - if (argc != 2) { - Tcl_AppendResult(interp, "wrong # args: should be \"", - argv[0], " names\"", NULL); - status = TCL_ERROR; - } else { - Tcl_DStringInit(&ds); - envp = Ns_GetEnviron(); - for (i = 0; envp[i] != NULL; ++i) { - name = envp[i]; - value = strchr(name, '='); - Tcl_DStringAppend(&ds, name, value ? value - name : -1); - Tcl_AppendElement(interp, ds.string); - Tcl_DStringTrunc(&ds, 0); - } - Tcl_DStringFree(&ds); - } - - } else if (STREQ(argv[1], "exists")) { - if (argc != 3) { - Tcl_AppendResult(interp, "wrong # args: should be \"", - argv[0], " exists name\"", NULL); - status = TCL_ERROR; - } else { - Tcl_SetResult(interp, getenv(argv[2]) ? "1" : "0", TCL_STATIC); - } ! } else if (STREQ(argv[1], "get")) { ! if ((argc != 3 && argc != 4) || ! (argc == 4 && !STREQ(argv[2], "-nocomplain"))) { ! badargs: ! Tcl_AppendResult(interp, "wrong # args: should be \"", ! argv[0], " ", argv[1], " ?-nocomplain? name\"", NULL); ! status = TCL_ERROR; ! } ! name = argv[argc-1]; ! value = getenv(name); ! if (value != NULL) { ! Tcl_SetResult(interp, value, TCL_VOLATILE); ! } else if (argc == 4) { ! Tcl_AppendResult(interp, "no such environment variable: ", ! argv[argc-1], NULL); ! status = TCL_ERROR; ! } ! } else if (STREQ(argv[1], "set")) { ! if (argc != 4) { ! Tcl_AppendResult(interp, "wrong # args: should be \"", ! argv[0], " set name value\"", NULL); ! status = TCL_ERROR; ! } else { ! status = PutEnv(interp, argv[2], argv[3]); ! } ! } else if (STREQ(argv[1], "unset")) { ! if ((argc != 3 && argc != 4) || ! (argc == 4 && !STREQ(argv[2], "-nocomplain"))) { ! goto badargs; ! } ! name = argv[argc-1]; ! if (argc == 3 && getenv(name) == NULL) { ! Tcl_AppendResult(interp, "no such environment variable: ", name, ! NULL); ! status = TCL_ERROR; ! } else { ! status = PutEnv(interp, name, ""); ! } ! } else { ! Tcl_AppendResult(interp, "unknown command \"", ! argv[1], "\": should be exists, names, get, set, or unset", NULL); ! status = TCL_ERROR; } Ns_MutexUnlock(&lock); return status; } --- 143,227 ---- int ! NsTclEnvObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ! char *name, *value, **envp; ! int status, i, opt; ! Tcl_Obj *result; ! static CONST char *opts[] = { ! "exists", "names", "get", "set", "unset", NULL ! }; ! enum { ! IExistsIdx, INamesIdx, IGetIdx, ISetIdx, IUnsetIdx ! }; ! ! if (objc < 2) { ! Tcl_WrongNumArgs(interp, 1, objv, "command ?args ...?"); ! return TCL_ERROR; ! } ! if (Tcl_GetIndexFromObj(interp, objv[1], opts, "command", 0, ! &opt) != TCL_OK) { ! return TCL_ERROR; } ! status = TCL_ERROR; Ns_MutexLock(&lock); ! switch (opt) { ! case IExistsIdx: ! if (objc != 3) { ! Tcl_WrongNumArgs(interp, 2, objv, "name"); ! goto done; ! } ! Tcl_SetBooleanObj(Tcl_GetObjResult(interp), getenv(Tcl_GetString(objv[2])) ? 1 : 0); ! break; ! case INamesIdx: ! envp = Ns_GetEnviron(); ! result = Tcl_GetObjResult(interp); ! for (i = 0; envp[i] != NULL; ++i) { ! name = envp[i]; ! value = strchr(name, '='); ! Tcl_ListObjAppendElement(interp, result, ! Tcl_NewStringObj(name, value ? value - name : -1)); ! } ! break; ! case ISetIdx: ! if (objc != 4) { ! Tcl_WrongNumArgs(interp, 2, objv, "name value"); ! goto done; ! } ! if (PutEnv(interp, Tcl_GetString(objv[2]), Tcl_GetString(objv[3])) ! != NS_OK) { ! goto done; ! } ! break; ! case IGetIdx: ! case IUnsetIdx: ! if ((objc != 3 && objc != 4) ! || (objc == 4 && !STREQ(Tcl_GetString(objv[2]), "-nocomplain"))) { ! Tcl_WrongNumArgs(interp, 2, objv, "?-nocomplain? name"); ! goto done; ! } ! name = Tcl_GetString(objv[2]); ! value = getenv(name); ! if (value == NULL && objc != 4) { ! Tcl_SetResult(interp, "no such environment variable", TCL_STATIC); ! goto done; ! } ! if (opt == IUnsetIdx && PutEnv(interp, name, NULL) != NS_OK) { ! goto done; ! } else { ! Tcl_SetResult(interp, value, TCL_VOLATILE); ! } ! break; } + status = TCL_OK; + done: Ns_MutexUnlock(&lock); + return status; } *************** *** 201,211 **** * PutEnv -- * ! * NsTclEnvCmd helper routine to update an environment variable. * * Results: ! * TCL_OK or TCL_ERROR. * * Side effects: ! * Environment variable is set. * *---------------------------------------------------------------------- --- 233,243 ---- * PutEnv -- * ! * NsTclEnvCmd helper routine to update an environment variable. * * Results: ! * TCL_OK or TCL_ERROR. * * Side effects: ! * Environment variable is set. * *---------------------------------------------------------------------- *************** *** 215,273 **** PutEnv(Tcl_Interp *interp, char *name, char *value) { ! char *s; ! size_t len; len = strlen(name); if (value != NULL) { ! len += strlen(value) + 1; } /* NB: Use malloc() directly as putenv() would expect. */ s = malloc(len + 1); if (s == NULL) { ! Tcl_SetResult(interp, ! "could not allocate memory for new env entry", TCL_STATIC); ! return TCL_ERROR; } strcpy(s, name); if (value != NULL) { ! strcat(s, "="); ! strcat(s, value); } if (putenv(s) != 0) { ! Tcl_AppendResult(interp, "could not put environment entry \"", ! s, "\": ", Tcl_PosixError(interp), NULL); ! free(s); ! return TCL_ERROR; } - return TCL_OK; - } - - - /* - *---------------------------------------------------------------------- - * - * Ns_GetEnviron -- - * - * Return the environment vector. - * - * Results: - * Pointer to environment. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ ! char ** ! Ns_GetEnviron(void) ! { ! char **envp; ! ! #ifdef HAVE__NSGETENVIRON ! envp = *_NSGetEnviron(); ! #else ! envp = environ; ! #endif ! return envp; } --- 247,276 ---- PutEnv(Tcl_Interp *interp, char *name, char *value) { ! char *s; ! size_t len; len = strlen(name); if (value != NULL) { ! len += strlen(value) + 1; } /* NB: Use malloc() directly as putenv() would expect. */ s = malloc(len + 1); if (s == NULL) { ! Tcl_SetResult(interp, ! "could not allocate memory for new env entry", TCL_STATIC); ! return TCL_ERROR; } strcpy(s, name); if (value != NULL) { ! strcat(s, "="); ! strcat(s, value); } if (putenv(s) != 0) { ! Tcl_AppendResult(interp, "could not put environment entry \"", ! s, "\": ", Tcl_PosixError(interp), NULL); ! free(s); ! return TCL_ERROR; } ! return TCL_OK; } |
From: Stephen D. <sd...@us...> - 2005-10-22 12:50:51
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5911 Modified Files: ChangeLog Log Message: * nsd/tclcmds.c: * nsd/tclenv.c: * tests/ns_env.test: Untabify and reformat code, convert to Tcl objects. Fix bugs with -nocomplain switch and unset command. (Bug# 1333280) Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.236 retrieving revision 1.237 diff -C2 -d -r1.236 -r1.237 *** ChangeLog 22 Oct 2005 09:31:05 -0000 1.236 --- ChangeLog 22 Oct 2005 12:50:39 -0000 1.237 *************** *** 1,2 **** --- 1,10 ---- + 2005-10-22 Stephen Deasey <sd...@us...> + + * nsd/tclcmds.c: + * nsd/tclenv.c: + * tests/ns_env.test: Untabify and reformat code, convert to Tcl + objects. Fix bugs with -nocomplain switch and unset + command. (Bug# 1333280) + 2005-10-22 Zoran Vasiljevic <vas...@us...> |
From: Zoran V. <vas...@us...> - 2005-10-22 09:33:04
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv830 Modified Files: configure.in Log Message: Added platform neutral checking for u_int32_t and u_int8_t types Index: configure.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/configure.in,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** configure.in 21 Oct 2005 12:03:03 -0000 1.15 --- configure.in 22 Oct 2005 09:32:52 -0000 1.16 *************** *** 147,150 **** --- 147,152 ---- AC_CHECK_HEADERS(inttypes.h) + AC_CHECK_TYPES(u_int32_t) + AC_CHECK_TYPES(u_int8_t) AC_CHECK_FUNCS(timegm fork1 poll drand48 random _NSGetEnviron) AC_CHECK_HEADER(mach-o/dyld.h, AC_DEFINE(USE_DYLD, 1, [Define to 1 if the <mach-o/dyld.h> header should be used.]),) |
From: Zoran V. <vas...@us...> - 2005-10-22 09:32:22
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv759/nsd Modified Files: tclmisc.c Log Message: Removed plaform testing and added platform-neutral testing for some types Index: tclmisc.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclmisc.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tclmisc.c 20 Oct 2005 15:03:50 -0000 1.14 --- tclmisc.c 22 Oct 2005 09:32:14 -0000 1.15 *************** *** 592,600 **** static char hexChars[] = "0123456789ABCDEF"; ! #ifndef __APPLE__ typedef unsigned int u_int32_t; typedef unsigned char u_int8_t; #endif /*** FROM sha.h: ***/ --- 592,604 ---- static char hexChars[] = "0123456789ABCDEF"; ! #ifndef HAVE_U_INT32_T typedef unsigned int u_int32_t; + #endif + + #ifndef HAVE_U_INT8_T typedef unsigned char u_int8_t; #endif + /*** FROM sha.h: ***/ |
From: Zoran V. <vas...@us...> - 2005-10-22 09:31:47
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv680/nsd Modified Files: nsmain.c Log Message: Watchdog wakes up every 10 minutes on all platforms. Index: nsmain.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsmain.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** nsmain.c 22 Oct 2005 08:26:25 -0000 1.25 --- nsmain.c 22 Oct 2005 09:31:36 -0000 1.26 *************** *** 55,67 **** */ ! #define MAX_RESTART_SECONDS 64 /* Max time in sec to wait between restarts */ ! #define MIN_WORK_SECONDS 128 /* After being up for # secs, reset timers */ ! #define MAX_NUM_RESTARTS 256 /* Quit after somany unsuccessful restarts */ ! ! #ifdef __APPLE__ ! # define WAKEUP_IN_SECONDS 600 /* Wakeup watchdog after somany seconds */ ! #else ! # define WAKEUP_IN_SECONDS 0 /* Wakeup watchdog after somuch seconds */ ! #endif /* --- 55,62 ---- */ ! #define MAX_RESTART_SECONDS 64 /* Max time in sec to wait between restarts */ ! #define MIN_WORK_SECONDS 128 /* After being up for # secs, reset timers */ ! #define MAX_NUM_RESTARTS 256 /* Quit after somany unsuccessful restarts */ ! #define WAKEUP_IN_SECONDS 600 /* Wakeup watchdog after somany seconds */ /* |
From: Zoran V. <vas...@us...> - 2005-10-22 09:31:17
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv611 Modified Files: ChangeLog Log Message: See file. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.235 retrieving revision 1.236 diff -C2 -d -r1.235 -r1.236 *** ChangeLog 22 Oct 2005 08:27:23 -0000 1.235 --- ChangeLog 22 Oct 2005 09:31:05 -0000 1.236 *************** *** 4,11 **** --- 4,18 ---- server process only. Fix the broken SIGINT hadling which allowed us to CTRL-C the booting process at any time. + Watchdog wakes up every 10 minutes on all platforms. * nsd/modload.c (Ns_ModuleLoad): make the passed file path absolute before attempting to load the module. + * nsd/tclmisc.c: removed plaform testing and added + platform-neutral testing for some data types. + + * configure.in: added platform neutral testing for + u_int32_t and u_int8_t types. + 2005-10-21 Zoran Vasiljevic <vas...@us...> |
From: Zoran V. <vas...@us...> - 2005-10-22 08:27:32
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21328 Modified Files: ChangeLog Log Message: See file. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.234 retrieving revision 1.235 diff -C2 -d -r1.234 -r1.235 *** ChangeLog 21 Oct 2005 12:01:18 -0000 1.234 --- ChangeLog 22 Oct 2005 08:27:23 -0000 1.235 *************** *** 1,2 **** --- 1,11 ---- + 2005-10-22 Zoran Vasiljevic <vas...@us...> + + * nsd/nsmain.c (Ns_Main): initialize Tcl library in the + server process only. Fix the broken SIGINT hadling which + allowed us to CTRL-C the booting process at any time. + + * nsd/modload.c (Ns_ModuleLoad): make the passed file + path absolute before attempting to load the module. + 2005-10-21 Zoran Vasiljevic <vas...@us...> |
From: Zoran V. <vas...@us...> - 2005-10-22 08:27:02
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21207/nsd Modified Files: modload.c Log Message: Make the passed file path absolute before attempting to load the module. Index: modload.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/modload.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** modload.c 21 Oct 2005 06:50:11 -0000 1.8 --- modload.c 22 Oct 2005 08:26:52 -0000 1.9 *************** *** 125,130 **** * Ns_ModuleLoad -- * ! * Load a module and initialize it. The result code from modules ! * without the version symbol are ignored. * * Results: --- 125,129 ---- * Ns_ModuleLoad -- * ! * Load a module and initialize it. * * Results: *************** *** 132,136 **** * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 131,135 ---- * * Side effects: ! * The result code from modules w/o the version symbol is ignored * *---------------------------------------------------------------------- *************** *** 143,146 **** --- 142,146 ---- Tcl_PackageInitProc *tclInitProc = NULL, *tclVerProc = NULL; Ns_ModuleInitProc *initProc = NULL; + Ns_DString ds; int status, *verPtr = NULL; Tcl_Obj *pathObj; *************** *** 151,159 **** Ns_Log(Notice, "modload: loading %s", file); pathObj = Tcl_NewStringObj(file, -1); Tcl_IncrRefCount(pathObj); if (Tcl_FSGetNormalizedPath(NULL, pathObj) == NULL) { - Tcl_DecrRefCount(pathObj); Ns_Log(Error, "modload: %s: invalid path", file); return NS_ERROR; } --- 151,165 ---- Ns_Log(Notice, "modload: loading %s", file); + Ns_DStringInit(&ds); + if (!Ns_PathIsAbsolute(file)) { + file = Ns_HomePath(&ds, "bin", file, NULL); + } pathObj = Tcl_NewStringObj(file, -1); + Tcl_IncrRefCount(pathObj); if (Tcl_FSGetNormalizedPath(NULL, pathObj) == NULL) { Ns_Log(Error, "modload: %s: invalid path", file); + Tcl_DecrRefCount(pathObj); + Ns_DStringFree(&ds); return NS_ERROR; } *************** *** 166,169 **** --- 172,176 ---- Ns_Log(Error, "modload: %s: %s", file, Tcl_GetStringResult(interp)); Tcl_DeleteInterp(interp); + Ns_DStringFree(&ds); return NS_ERROR; } *************** *** 175,181 **** --- 182,191 ---- if (initProc == NULL) { Ns_Log(Error, "modload: %s: %s: symbol not found", file, init); + Ns_DStringFree(&ds); return NS_ERROR; } + status = (*initProc)(server, module); + if (verPtr == NULL || *verPtr < 1) { status = NS_OK; *************** *** 184,187 **** --- 194,199 ---- } + Ns_DStringFree(&ds); + return status; } |
From: Zoran V. <vas...@us...> - 2005-10-22 08:26:33
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21111/nsd Modified Files: nsmain.c Log Message: Initialize Tcl library in the server process only. Fix the broken SIGINT hadling which allowed us to CTRL-C the booting process at any time. Index: nsmain.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsmain.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** nsmain.c 16 Oct 2005 08:52:48 -0000 1.24 --- nsmain.c 22 Oct 2005 08:26:25 -0000 1.25 *************** *** 158,166 **** /* * When run as a Win32 service, Ns_Main will be re-entered ! * in the service main thread. In this case, jump past ! * the point where the initial thread blocked when ! * connected to the service control manager. */ ! #ifdef _WIN32 if (mode == 'S') { --- 158,166 ---- /* * When run as a Win32 service, Ns_Main will be re-entered ! * in the service main thread. In this case, jump past the ! * point where the initial thread blocked when connected to ! * the service control manager. */ ! #ifdef _WIN32 if (mode == 'S') { *************** *** 169,195 **** #endif - /* - * Set up configuration defaults and initial values. - */ - nsconf.argv0 = argv[0]; - /* - * File descriptors 1 and 2 may not be open if the server - * is starting from /etc/init. If so, open them on /dev/null - * as well because the server will assume they're open during - * initialization. In particular, the log file will be duped - * to fd's 1 and 2. - */ - - fd = open(DEVNULL, O_WRONLY); - if (fd > 0 && fd != 1) { - close(fd); - } - fd = open(DEVNULL, O_WRONLY); - if (fd > 0 && fd != 2) { - close(fd); - } - /* * Parse the command line arguments. --- 169,174 ---- *************** *** 305,314 **** UsageError("required -t <config> option not specified"); } - if (mode != 'c') { - /* - * The server requires file descriptor 0 be open on /dev/null to - * ensure the server never blocks reading stdin. - */ fd = open(DEVNULL, O_RDONLY); if (fd > 0) { --- 284,295 ---- UsageError("required -t <config> option not specified"); } + /* + * For the non-interactive operation, the server requires file + * descriptor 0 be open on NUL device to ensure it never blocks + * while reading stdin. + */ + + if (mode != 'c') { fd = open(DEVNULL, O_RDONLY); if (fd > 0) { *************** *** 318,335 **** } /* ! * Find the absolute config pathname and read the config data ! * before a possible chroot(). The call to Tcl_FindExecutable() ! * must be done first in order to setup Tcl library, otherwise ! * the FindConfig() which uses TclVFS wrappers will fail. */ Tcl_FindExecutable(argv[0]); - nsconf.nsd = (char *) Tcl_GetNameOfExecutable(); nsconf.config = FindConfig(nsconf.config); config = NsConfigRead(nsconf.config); ! ! #ifndef _WIN32 /* --- 299,338 ---- } + /* + * File descriptors 1 and 2 may not be open if the server is + * starting from /etc/init. If so, open them on NUL device + * as well, because the server will assume they're open during + * initialization. In particular, the log file will be duped + * to fd's 1 and 2. + */ + + fd = open(DEVNULL, O_WRONLY); + if (fd > 0 && fd != 1) { + close(fd); + } + fd = open(DEVNULL, O_WRONLY); + if (fd > 0 && fd != 2) { + close(fd); + } + + #ifdef _WIN32 + /* ! * The call to Tcl_FindExecutable() must be done before we ever ! * attempt any file-related operation, because it is initializing ! * the Tcl library and virtual filesystem interface. */ Tcl_FindExecutable(argv[0]); nsconf.nsd = (char *) Tcl_GetNameOfExecutable(); + + /* + * Locate and read the configuration file for later evaluation. + */ + nsconf.config = FindConfig(nsconf.config); config = NsConfigRead(nsconf.config); ! ! #else /* *************** *** 389,395 **** * he/she should have used "-u" to give the actual user * to run as (may be root as well) and optionally "-g" ! * to set the process group. We're picky about the group ! * though. If we were not able to figure out to which ! * group the user belongs to, we will abort, no mercy. */ --- 392,396 ---- * he/she should have used "-u" to give the actual user * to run as (may be root as well) and optionally "-g" ! * to set the process group. */ *************** *** 403,406 **** --- 404,448 ---- } } + + /* + * Fork into the background + */ + + if (mode == 0 || mode == 'w') { + i = ns_fork(); + if (i == -1) { + Ns_Fatal("nsmain: fork() failed: '%s'", strerror(errno)); + } + if (i > 0) { + return 0; + } + setsid(); /* Detach from the controlling terminal device */ + } + + /* + * For watchdog mode, start the watchdog/server process pair. + * The watchdog will monitor and restart the server unless the + * server exits gracefully, either by calling exit(0) or get + * signalled by the SIGTERM signal. + * The watchdog itself will exit when the server exits gracefully, + * or, when get signalled by the SIGTERM signal. In the latter + * case, watchdog will pass the SIGTERM to the server, so both of + * them will gracefully exit. + */ + + if (mode == 'w') { + if (StartWatchedServer() == 0) { + return 0; + } + } else { + nsconf.pid = getpid(); + } + + /* + * Block all signals for the duration of startup to ensure any new + * threads inherit the blocked state. + */ + + NsBlockSignals(debug); /* *************** *** 427,469 **** } } ! /* ! * Fork us into the background */ ! ! if (mode == 0 || mode == 'w') { ! i = ns_fork(); ! if (i == -1) { ! Ns_Fatal("nsmain: fork() failed: '%s'", strerror(errno)); ! } ! if (i > 0) { ! return 0; ! } ! setsid(); /* Detach from the controlling terminal device */ ! } ! /* ! * Optionally, start the watchdog/server process pair. ! * The watchdog process will monitor and restart the server unless ! * the server exits gracefully, either by calling exit(0) or get ! * signalled by the SIGTERM signal. ! * The watchdog process itself will exit when the server process ! * exits gracefully, or, when get signalled by the SIGTERM signal. ! * In the latter case, watchdog will pass the SIGTERM to the server ! * process, so both of them will gracefully terminate. */ ! if (mode == 'w') { ! if (StartWatchedServer() == 0) { ! return 0; ! } ! } else { ! nsconf.pid = getpid(); ! } ! /* * Pre-bind any sockets now, before a possible setuid from root ! * or chroot which may hide /etc/resolv.conf required to ! * resolve name-based addresses. */ --- 469,493 ---- } } ! /* ! * The call to Tcl_FindExecutable() must be done before we ever ! * attempt any file-related operation, because it is initializing ! * the Tcl library and virtual filesystem interface. */ ! ! Tcl_FindExecutable(argv[0]); ! nsconf.nsd = (char *) Tcl_GetNameOfExecutable(); ! /* ! * Locate and read the configuration file for later evaluation. */ ! nsconf.config = FindConfig(nsconf.config); ! config = NsConfigRead(nsconf.config); ! /* * Pre-bind any sockets now, before a possible setuid from root ! * or chroot which may hide /etc/resolv.conf required to resolve ! * name-based addresses. */ *************** *** 520,541 **** * get core files. */ ! if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) { Ns_Fatal("nsmain: prctl(PR_SET_DUMPABLE) failed: '%s'", strerror(errno)); } - #endif - - /* - * Finally, block all signals for the duration of startup to ensure any - * new threads inherit the blocked state. - */ ! NsBlockSignals(debug); #endif /* _WIN32 */ /* ! * Initialize Tcl and eval the config file. */ --- 544,559 ---- * get core files. */ ! if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) { Ns_Fatal("nsmain: prctl(PR_SET_DUMPABLE) failed: '%s'", strerror(errno)); } ! #endif /* __linux */ #endif /* _WIN32 */ /* ! * Evaluate the config file. */ *************** *** 717,720 **** --- 735,739 ---- if (mode == 'c') { + /* * Initialize Tcl and start interpreting commands. |
From: Zoran V. <vas...@us...> - 2005-10-21 12:04:52
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18304/include Modified Files: Makefile.global.in Log Message: Link against libnsd library when linking new nsdbstest driver Index: Makefile.global.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/Makefile.global.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.global.in 10 Jun 2005 07:29:19 -0000 1.11 --- Makefile.global.in 21 Oct 2005 12:04:44 -0000 1.12 *************** *** 79,89 **** INCDIR = $(NAVISERVER)/include else ! LDFLAGS += -L../nsthread -L../nsd INCDIR = ../include ifneq (nsthread,$(LIB)) ! LIBS += -lnsthread ! ifneq (nsd,$(LIB)) ifneq (nsthreadtest,$(PGM)) ! LIBS += -lnsd endif endif --- 79,93 ---- INCDIR = $(NAVISERVER)/include else ! LDFLAGS += -L../nsthread -L../nsd -L../nsdb INCDIR = ../include ifneq (nsthread,$(LIB)) ! LIBS += -lnsthread ! ifneq (nsd,$(LIB)) ifneq (nsthreadtest,$(PGM)) ! ifeq (nsdbtest,$(MODNAME)) ! LIBS += -lnsd -lnsdb ! else ! LIBS += -lnsd ! endif endif endif *************** *** 92,96 **** NSLIBS += @TCL_LIB_SPEC@ @TCL_LIBS@ @LDFLAGS@ @LIBS@ ! CCLIBS = $(NSLIBS) @TCL_LD_FLAGS@ # Install directories --- 96,100 ---- NSLIBS += @TCL_LIB_SPEC@ @TCL_LIBS@ @LDFLAGS@ @LIBS@ ! CCLIBS = $(NSLIBS) # Install directories |
From: Zoran V. <vas...@us...> - 2005-10-21 12:04:22
|
Update of /cvsroot/naviserver/naviserver/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17957/m4 Modified Files: tcl.m4 Log Message: Removed "-prebind" for Darwin builds Index: tcl.m4 =================================================================== RCS file: /cvsroot/naviserver/naviserver/m4/tcl.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcl.m4 9 Oct 2005 23:43:58 -0000 1.1 --- tcl.m4 21 Oct 2005 12:04:14 -0000 1.2 *************** *** 1504,1508 **** DL_OBJS="tclLoadDyld.o" DL_LIBS="" ! LDFLAGS="$LDFLAGS -prebind -headerpad_max_install_names" AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ hold_ldflags=$LDFLAGS --- 1504,1508 ---- DL_OBJS="tclLoadDyld.o" DL_LIBS="" ! LDFLAGS="$LDFLAGS -headerpad_max_install_names" AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ hold_ldflags=$LDFLAGS |
From: Zoran V. <vas...@us...> - 2005-10-21 12:03:12
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17699 Modified Files: configure.in Log Message: Cosmetic change Index: configure.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/configure.in,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** configure.in 16 Oct 2005 08:38:29 -0000 1.14 --- configure.in 21 Oct 2005 12:03:03 -0000 1.15 *************** *** 109,117 **** CCRPATH="$CCRPATH \$(CCRFLAG)\$(TCL_EXEC_PREFIX)/lib" LDRPATH="$LDRPATH \$(LDRFLAG)\$(TCL_EXEC_PREFIX)/lib" ! fi ! if test -d /usr/lib/lwp; then CCRPATH="$CCRPATH \$(CCRFLAG)/usr/lib/lwp" LDRPATH="$LDRPATH \$(LDRFLAG)/usr/lib/lwp" ! fi LDSO="\$(LDLIB)" CCRPATHS="\$(CCRPATH)" --- 109,117 ---- CCRPATH="$CCRPATH \$(CCRFLAG)\$(TCL_EXEC_PREFIX)/lib" LDRPATH="$LDRPATH \$(LDRFLAG)\$(TCL_EXEC_PREFIX)/lib" ! fi ! if test -d /usr/lib/lwp; then CCRPATH="$CCRPATH \$(CCRFLAG)/usr/lib/lwp" LDRPATH="$LDRPATH \$(LDRFLAG)/usr/lib/lwp" ! fi LDSO="\$(LDLIB)" CCRPATHS="\$(CCRPATH)" |
From: Zoran V. <vas...@us...> - 2005-10-21 12:02:20
|
Update of /cvsroot/naviserver/naviserver/nsdbtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17293/nsdbtest Modified Files: Makefile Log Message: Add MODNAME of nsdbtest so we can do more checks when linking the module Index: Makefile =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsdbtest/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 20 Oct 2005 23:38:15 -0000 1.1 --- Makefile 21 Oct 2005 12:02:09 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- # + MODNAME = nsdbtest MOD = nsdbtest.so OBJS = nsdbtest.o |
From: Zoran V. <vas...@us...> - 2005-10-21 12:01:34
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17114 Modified Files: ChangeLog Log Message: See file. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.233 retrieving revision 1.234 diff -C2 -d -r1.233 -r1.234 *** ChangeLog 21 Oct 2005 10:11:44 -0000 1.233 --- ChangeLog 21 Oct 2005 12:01:18 -0000 1.234 *************** *** 4,8 **** * nsd/tclfile.c: re-born ns_normalizepath as C command * tcl/compat.tcl: removed Tcl ns_normalizepath wrapper ! 2005-10-21 Bernd Eidenschink <ei...@us...> --- 4,14 ---- * nsd/tclfile.c: re-born ns_normalizepath as C command * tcl/compat.tcl: removed Tcl ns_normalizepath wrapper ! * configure.in: cosmetic change ! * include/Makefile.global.in: link against libnsd library ! when linking new nsdbstest driver ! * nsdbtest/Makefile: add MODNAME of nsdbtest so we can ! do more checks when linking the module ! * m4/tcl.m4: removed "-prebind" for Darwin builds ! 2005-10-21 Bernd Eidenschink <ei...@us...> |