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: Stephen D. <sd...@us...> - 2005-10-17 11:25:26
|
Update of /cvsroot/naviserver/naviserver/nsdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10314/nsdb Modified Files: dbinit.c Log Message: * nslog/nslog.c: * nscp/nscp.c: * nscgi/nscgi.c: * nsdb/dbinit.c: Use new config routines. Index: dbinit.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsdb/dbinit.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dbinit.c 10 Jun 2005 17:58:41 -0000 1.2 --- dbinit.c 17 Oct 2005 11:25:17 -0000 1.3 *************** *** 1039,1060 **** poolPtr->desc = Ns_ConfigGetValue("ns/db/pools", pool); poolPtr->stale_on_close = 0; ! if (!Ns_ConfigGetBool(path, "verbose", &poolPtr->fVerbose)) { ! poolPtr->fVerbose = 0; ! } ! if (!Ns_ConfigGetBool(path, "logsqlerrors", &poolPtr->fVerboseError)) { ! poolPtr->fVerboseError = 0; ! } ! if (!Ns_ConfigGetInt(path, "connections", &poolPtr->nhandles) ! || poolPtr->nhandles <= 0) { ! poolPtr->nhandles = 2; ! } ! if (Ns_ConfigGetInt(path, "MaxIdle", &i) == NS_FALSE || i < 0) { ! i = 600; /* 10 minutes */ ! } ! poolPtr->maxidle = i; ! if (Ns_ConfigGetInt(path, "MaxOpen", &i) == NS_FALSE || i < 0) { ! i = 3600; /* 1 hour */ ! } ! poolPtr->maxopen = i; poolPtr->firstPtr = poolPtr->lastPtr = NULL; for (i = 0; i < poolPtr->nhandles; ++i) { --- 1039,1048 ---- poolPtr->desc = Ns_ConfigGetValue("ns/db/pools", pool); poolPtr->stale_on_close = 0; ! poolPtr->fVerbose = Ns_ConfigBool(path, "verbose", NS_FALSE); ! poolPtr->fVerboseError = Ns_ConfigBool(path, "logsqlerrors", NS_FALSE); ! poolPtr->nhandles = Ns_ConfigIntRange(path, "connections", 2, 0, INT_MAX); ! poolPtr->maxidle = Ns_ConfigIntRange(path, "maxidle", 600, 0, INT_MAX); ! poolPtr->maxopen = Ns_ConfigIntRange(path, "maxopen", 3600, 0, INT_MAX); ! poolPtr->firstPtr = poolPtr->lastPtr = NULL; for (i = 0; i < poolPtr->nhandles; ++i) { *************** *** 1087,1094 **** ReturnHandle(handlePtr); } ! if (!Ns_ConfigGetInt(path, "checkinterval", &i) || i < 0) { ! i = 600; /* 10 minutes. */ ! } ! Ns_ScheduleProc(CheckPool, poolPtr, 0, i); return poolPtr; } --- 1075,1080 ---- ReturnHandle(handlePtr); } ! Ns_ScheduleProc(CheckPool, poolPtr, 0, ! Ns_ConfigIntRange(path, "checkinterval", 600, 0, INT_MAX)); return poolPtr; } |
From: Stephen D. <sd...@us...> - 2005-10-17 11:25:26
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10314 Modified Files: ChangeLog Log Message: * nslog/nslog.c: * nscp/nscp.c: * nscgi/nscgi.c: * nsdb/dbinit.c: Use new config routines. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.215 retrieving revision 1.216 diff -C2 -d -r1.215 -r1.216 *** ChangeLog 16 Oct 2005 08:52:48 -0000 1.215 --- ChangeLog 17 Oct 2005 11:25:15 -0000 1.216 *************** *** 1,2 **** --- 1,9 ---- + 2005-10-17 Stephen Deasey <sd...@us...> + + * nslog/nslog.c: + * nscp/nscp.c: + * nscgi/nscgi.c: + * nsdb/dbinit.c: Use new config routines. + 2005-10-15 Stephen Deasey <sd...@us...> |
From: Stephen D. <sd...@us...> - 2005-10-16 08:52:56
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23373/nsd Modified Files: config.c driver.c log.c nsconf.c nsd.h nsmain.c Log Message: * nsd/config.c: Log the section, key, value and any default, min or max whenever a configuration value is looked up. Log at level Debug which by default is off. Can now quickly determine which config keys are valid/used. * nsd/nsmain.c: * nsd/nsconf.c: * nsd/log.c: Initialise log system earlier -- dissable Dev and Debug log levels during early boot up. * nsd/driver.c: * nsd/nsd.h: Some logging cleanup. Index: nsd.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsd.h,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** nsd.h 9 Oct 2005 22:27:24 -0000 1.35 --- nsd.h 16 Oct 2005 08:52:48 -0000 1.36 *************** *** 594,598 **** bool enabled; int opts; /* NSD_STRIP_WWW | NSD_STRIP_PORT */ ! char *hostprefix; int hosthashlevel; Ns_ServerRootProc *serverRootProc; --- 594,598 ---- bool enabled; int opts; /* NSD_STRIP_WWW | NSD_STRIP_PORT */ ! CONST char *hostprefix; int hosthashlevel; Ns_ServerRootProc *serverRootProc; Index: config.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/config.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** config.c 9 Oct 2005 04:42:30 -0000 1.6 --- config.c 16 Oct 2005 08:52:48 -0000 1.7 *************** *** 49,52 **** --- 49,53 ---- static Ns_Set *GetSection(CONST char *section, int create); static char *ConfigGet(CONST char *section, CONST char *key, int exact); + static int ToBool(CONST char *value, int *valuePtr); *************** *** 73,81 **** CONST char *value; ! value = Ns_ConfigGetValue(section, key); ! if (value == NULL) { ! value = def; ! } ! return value; } --- 74,82 ---- CONST char *value; ! value = ConfigGet(section, key, 0); ! Ns_Log(Debug, "config: %s:%s value=\"%s\" default=\"%s\" (string)", ! section, key, value, def); ! ! return value ? value : def; } *************** *** 101,110 **** Ns_ConfigBool(CONST char *section, CONST char *key, int def) { ! int value; ! if (!Ns_ConfigGetBool(section, key, &value)) { ! value = def ? NS_TRUE : NS_FALSE; } ! return value; } --- 102,118 ---- Ns_ConfigBool(CONST char *section, CONST char *key, int def) { ! CONST char *s; ! int value, found = NS_FALSE; ! s = ConfigGet(section, key, 0); ! if (s != NULL && ToBool(s, &value)) { ! found = NS_TRUE; } ! Ns_Log(Debug, "config: %s:%s value=%s default=%s (bool)", ! section, key, ! found ? (value ? "true" : "false") : "(null)", ! def ? "true" : "false"); ! ! return found ? value : def; } *************** *** 113,120 **** *---------------------------------------------------------------------- * ! * Ns_ConfigInt -- * * Return an integer config file value, or the default if not ! * found. * * Results: --- 121,128 ---- *---------------------------------------------------------------------- * ! * Ns_ConfigInt, Ns_ConfigIntRange -- * * Return an integer config file value, or the default if not ! * found. The returned value will be between the given min and max. * * Results: *************** *** 122,126 **** * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 130,134 ---- * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 130,169 **** Ns_ConfigInt(CONST char *section, CONST char *key, int def) { ! int value; ! ! if (!Ns_ConfigGetInt(section, key, &value)) { ! value = def; ! } ! return value; } - - /* - *---------------------------------------------------------------------- - * - * Ns_ConfigIntRange -- - * - * Return an integer config file value, or the default if not - * found. The returned value will be between the given min and max. - * - * Results: - * An integer. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - int Ns_ConfigIntRange(CONST char *section, CONST char *key, int def, int min, int max) { int value; ! value = Ns_ConfigInt(section, key, def); ! value = MAX(value, min); ! value = MIN(value, max); ! return value; } --- 138,170 ---- Ns_ConfigInt(CONST char *section, CONST char *key, int def) { ! return Ns_ConfigIntRange(section, key, def, INT_MIN, INT_MAX); } int Ns_ConfigIntRange(CONST char *section, CONST char *key, int def, int min, int max) { + CONST char *s; int value; ! s = ConfigGet(section, key, 0); ! if (s != NULL && Ns_StrToInt(s, &value) == NS_OK) { ! Ns_Log(Debug, "config: %s:%s value=%d min=%d max=%d default=%d (int)", ! section, key, value, min, max, def); ! } else { ! Ns_Log(Debug, "config: %s:%s value=(null) min=%d max=%d default=%d (int)", ! section, key, min, max, def); ! value = def; ! } ! if (value < min) { ! Ns_Log(Warning, "config: %s:%s value=%d, rounded up to %d", ! section, key, value, min); ! value = min; ! } ! if (value > max) { ! Ns_Log(Warning, "config: %s:%s value=%d, rounded down to %d", ! section, key, value, max); ! value = max; ! } return value; } *************** *** 189,193 **** Ns_ConfigGetValue(CONST char *section, CONST char *key) { ! return ConfigGet(section, key, 0); } --- 190,200 ---- Ns_ConfigGetValue(CONST char *section, CONST char *key) { ! char *value; ! ! value = ConfigGet(section, key, 0); ! Ns_Log(Debug, "config: %s:%s value=%s (string)", ! section, key, value); ! ! return value; } *************** *** 212,216 **** Ns_ConfigGetValueExact(CONST char *section, CONST char *key) { ! return ConfigGet(section, key, 1); } --- 219,229 ---- Ns_ConfigGetValueExact(CONST char *section, CONST char *key) { ! char *value; ! ! value = ConfigGet(section, key, 1); ! Ns_Log(Debug, "config: %s:%s value=%s (string, exact match)", ! section, key, value); ! ! return value; } *************** *** 236,246 **** Ns_ConfigGetInt(CONST char *section, CONST char *key, int *valuePtr) { ! char *s; ! s = Ns_ConfigGetValue(section, key); ! if (s == NULL || sscanf(s, "%d", valuePtr) != 1) { ! return NS_FALSE; } ! return NS_TRUE; } --- 249,267 ---- Ns_ConfigGetInt(CONST char *section, CONST char *key, int *valuePtr) { ! CONST char *s; ! int found; ! s = ConfigGet(section, key, 0); ! if (s != NULL && Ns_StrToInt(s, valuePtr) == NS_OK) { ! Ns_Log(Debug, "config: %s:%s value=%d min=%d max=%d (int)", ! section, key, *valuePtr, INT_MIN, INT_MAX); ! found = NS_TRUE; ! } else { ! Ns_Log(Debug, "config: %s:%s value=(null) min=%d max=%d (int)", ! section, key, INT_MIN, INT_MAX); ! *valuePtr = 0; ! found = NS_FALSE; } ! return found; } *************** *** 296,325 **** Ns_ConfigGetBool(CONST char *section, CONST char *key, int *valuePtr) { ! char *s; ! s = Ns_ConfigGetValue(section, key); ! if (s == NULL) { ! return NS_FALSE; } ! if (STREQ(s, "1") ! || STRIEQ(s, "y") ! || STRIEQ(s, "yes") ! || STRIEQ(s, "on") ! || STRIEQ(s, "t") ! || STRIEQ(s, "true")) { ! ! *valuePtr = 1; ! } else if (STREQ(s, "0") ! || STRIEQ(s, "n") ! || STRIEQ(s, "no") ! || STRIEQ(s, "off") ! || STRIEQ(s, "f") ! || STRIEQ(s, "false")) { ! *valuePtr = 0; ! } else if (sscanf(s, "%d", valuePtr) != 1) { ! return NS_FALSE; ! } ! return NS_TRUE; } --- 317,332 ---- Ns_ConfigGetBool(CONST char *section, CONST char *key, int *valuePtr) { ! CONST char *s; ! int found = NS_FALSE; ! s = ConfigGet(section, key, 0); ! if (s != NULL && ToBool(s, valuePtr)) { ! found = NS_TRUE; } ! Ns_Log(Debug, "config: %s:%s value=%s (bool)", ! section, key, ! found ? (*valuePtr ? "true" : "false") : "(null)"); ! return found; } *************** *** 370,373 **** --- 377,381 ---- } va_end(ap); + Ns_Log(Debug, "config section: %s", Ns_DStringValue(&ds)); set = Ns_ConfigGetSection(ds.string); *************** *** 777,778 **** --- 785,833 ---- return set; } + + + /* + *---------------------------------------------------------------------- + * + * ToBool -- + * + * Interpret value as a boolean. There are many ways to represent + * a boolean value. + * + * Results: + * NS_TRUE if value converted to boolean, NS_FALSE otherwise. + * + * Side effects: + * The boolean value is returned by reference. + * + *---------------------------------------------------------------------- + */ + + int + ToBool(CONST char *value, int *valuePtr) + { + int bool; + + if (STREQ(value, "1") + || STRIEQ(value, "y") + || STRIEQ(value, "yes") + || STRIEQ(value, "on") + || STRIEQ(value, "t") + || STRIEQ(value, "true")) { + + bool = NS_TRUE; + } else if (STREQ(value, "0") + || STRIEQ(value, "n") + || STRIEQ(value, "no") + || STRIEQ(value, "off") + || STRIEQ(value, "f") + || STRIEQ(value, "false")) { + + bool = NS_FALSE; + } else if (Ns_StrToInt(value, &bool) != NS_OK) { + return NS_FALSE; + } + *valuePtr = bool ? NS_TRUE : NS_FALSE; + + return NS_TRUE; + } Index: log.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/log.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** log.c 8 Oct 2005 12:06:07 -0000 1.9 --- log.c 16 Oct 2005 08:52:48 -0000 1.10 *************** *** 104,109 **** {"Fatal", NS_TRUE}, {"Bug", NS_TRUE}, ! {"Debug", NS_TRUE}, ! {"Dev", NS_TRUE} }; --- 104,109 ---- {"Fatal", NS_TRUE}, {"Bug", NS_TRUE}, ! {"Debug", NS_FALSE}, ! {"Dev", NS_FALSE} }; *************** *** 156,162 **** CONST char *path = NS_CONFIG_PARAMETERS; - logConfig[Notice].enabled = Ns_ConfigBool(path, "lognotice", NS_TRUE); logConfig[Debug].enabled = Ns_ConfigBool(path, "logdebug", NS_FALSE); logConfig[Dev].enabled = Ns_ConfigBool(path, "logdev", NS_FALSE); if (Ns_ConfigBool(path, "logroll", NS_TRUE)) { --- 156,162 ---- CONST char *path = NS_CONFIG_PARAMETERS; logConfig[Debug].enabled = Ns_ConfigBool(path, "logdebug", NS_FALSE); logConfig[Dev].enabled = Ns_ConfigBool(path, "logdev", NS_FALSE); + logConfig[Notice].enabled = Ns_ConfigBool(path, "lognotice", NS_TRUE); if (Ns_ConfigBool(path, "logroll", NS_TRUE)) { Index: nsmain.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsmain.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** nsmain.c 11 Oct 2005 21:19:31 -0000 1.23 --- nsmain.c 16 Oct 2005 08:52:48 -0000 1.24 *************** *** 582,585 **** --- 582,591 ---- } nsconf.home = SetCwd(nsconf.home); + + /* + * Update core config values. + */ + + NsConfUpdate(); #ifdef _WIN32 *************** *** 613,622 **** /* - * Update core config values. - */ - - NsConfUpdate(); - - /* * Open the log file now that the home directory and runtime * user id have been set. --- 619,622 ---- Index: nsconf.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsconf.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** nsconf.c 8 Oct 2005 12:06:07 -0000 1.7 --- nsconf.c 16 Oct 2005 08:52:48 -0000 1.8 *************** *** 158,167 **** char *path = NS_CONFIG_PARAMETERS; NsUpdateEncodings(); NsUpdateMimeTypes(); NsUpdateUrlEncode(); - Ns_DStringInit(&ds); - /* * libnsthread --- 158,171 ---- char *path = NS_CONFIG_PARAMETERS; + /* + * log.c + */ + + NsConfigLog(); + NsUpdateEncodings(); NsUpdateMimeTypes(); NsUpdateUrlEncode(); /* * libnsthread *************** *** 174,183 **** /* - * log.c - */ - - NsConfigLog(); - - /* * nsmain.c */ --- 178,181 ---- *************** *** 204,209 **** if (Ns_ConfigBool(path, "dnscache", NS_TRUE)) { ! int max = Ns_ConfigInt(path, "dnscachemaxentries", 100); ! i = Ns_ConfigInt(path, "dnscachetimeout", 60); if (max > 0 && i > 0) { i *= 60; /* NB: Config minutes, seconds internally. */ --- 202,207 ---- if (Ns_ConfigBool(path, "dnscache", NS_TRUE)) { ! int max = Ns_ConfigIntRange(path, "dnscachemaxentries", 100, 0, INT_MAX); ! i = Ns_ConfigIntRange(path, "dnscachetimeout", 60, 0, INT_MAX); if (max > 0 && i > 0) { i *= 60; /* NB: Config minutes, seconds internally. */ *************** *** 216,219 **** --- 214,218 ---- */ + Ns_DStringInit(&ds); nsconf.tcl.sharedlibrary = Ns_ConfigGetValue(path, "tcllibrary"); if (nsconf.tcl.sharedlibrary == NULL) { *************** *** 222,226 **** } nsconf.tcl.lockoninit = Ns_ConfigBool(path, "tclinitlock", NS_FALSE); - Ns_DStringFree(&ds); } --- 221,224 ---- Index: driver.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/driver.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** driver.c 9 Oct 2005 04:42:30 -0000 1.23 --- driver.c 16 Oct 2005 08:52:48 -0000 1.24 *************** *** 321,325 **** drvPtr->protocol = ns_strdup(defproto); drvPtr->address = ns_strdup(address); ! drvPtr->port = Ns_ConfigInt(path, "port", defport); drvPtr->location = Ns_ConfigGetValue(path, "location"); if (drvPtr->location != NULL && strstr(drvPtr->location, "://")) { --- 321,325 ---- drvPtr->protocol = ns_strdup(defproto); drvPtr->address = ns_strdup(address); ! drvPtr->port = Ns_ConfigIntRange(path, "port", defport, 0, 65535); drvPtr->location = Ns_ConfigGetValue(path, "location"); if (drvPtr->location != NULL && strstr(drvPtr->location, "://")) { |
From: Stephen D. <sd...@us...> - 2005-10-16 08:52:56
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23373 Modified Files: ChangeLog Log Message: * nsd/config.c: Log the section, key, value and any default, min or max whenever a configuration value is looked up. Log at level Debug which by default is off. Can now quickly determine which config keys are valid/used. * nsd/nsmain.c: * nsd/nsconf.c: * nsd/log.c: Initialise log system earlier -- dissable Dev and Debug log levels during early boot up. * nsd/driver.c: * nsd/nsd.h: Some logging cleanup. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.214 retrieving revision 1.215 diff -C2 -d -r1.214 -r1.215 *** ChangeLog 16 Oct 2005 08:38:29 -0000 1.214 --- ChangeLog 16 Oct 2005 08:52:48 -0000 1.215 *************** *** 1,4 **** --- 1,15 ---- 2005-10-15 Stephen Deasey <sd...@us...> + * nsd/config.c: Log the section, key, value and any default, min + or max whenever a configuration value is looked up. Log at level + Debug which by default is off. Can now quickly determine which config + keys are valid/used. + * nsd/nsmain.c: + * nsd/nsconf.c: + * nsd/log.c: Initialise log system earlier -- dissable Dev and + Debug log levels during early boot up. + * nsd/driver.c: + * nsd/nsd.h: Some logging cleanup. + * Makefile: * acinclude.m4: |
From: Stephen D. <sd...@us...> - 2005-10-16 08:38:40
|
Update of /cvsroot/naviserver/naviserver/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21427/m4 Added Files: dns.m4 Log Message: * Makefile: * acinclude.m4: * m4/dns.m4: Drop acinclude.m4 and move dns checking macros into own file in m4 directory. * configure.in: * nsd/dns.c: Use built-in AC_CHECK_MEMBERS macro. --- NEW FILE: dns.m4 --- # # The contents of this file are subject to the AOLserver Public License # Version 1.1 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://aolserver.com/. # # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See # the License for the specific language governing rights and limitations # under the License. # # The Original Code is AOLserver Code and related documentation # distributed by AOL. # # The Initial Developer of the Original Code is America Online, # Inc. Portions created by AOL are Copyright (C) 1999 America Online, # Inc. All Rights Reserved. # # Alternatively, the contents of this file may be used under the terms # of the GNU General Public License (the "GPL"), in which case the # provisions of GPL are applicable instead of those above. If you wish # to allow use of your version of this file only under the terms of the # GPL and not to allow others to use your version of this file under the # License, indicate your decision by deleting the provisions above and # replace them with the notice and other provisions required by the GPL. # If you do not delete the provisions above, a recipient may use your # version of this file under either the License or the GPL. # # # $Header: /cvsroot/naviserver/naviserver/m4/dns.m4,v 1.1 2005/10/16 08:38:29 sdeasey Exp $ # dnl dnl Check to see what variant of gethostbyname_r() we have. Defines dnl HAVE_GETHOSTBYNAME_R_{6, 5, 3} depending on what variant is found. dnl dnl Based on David Arnold's example from the comp.programming.threads dnl FAQ Q213. dnl AC_DEFUN([AC_HAVE_GETHOSTBYNAME_R], [saved_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -lnsl" AC_CHECK_FUNC(gethostbyname_r, [ AC_MSG_CHECKING([for gethostbyname_r with 6 args]) AC_TRY_COMPILE([ #include <netdb.h> ], [ char *name; struct hostent *he, *res; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop); ], [ AC_DEFINE(HAVE_GETHOSTBYNAME_R,1,[Define to 1 if gethostbyname_r is available.]) AC_DEFINE(HAVE_GETHOSTBYNAME_R_6,1,[Define to 1 if gethostbyname_r takes 6 args.]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) AC_MSG_CHECKING([for gethostbyname_r with 5 args]) AC_TRY_COMPILE([ #include <netdb.h> ], [ char *name; struct hostent *he; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop); ], [ AC_DEFINE(HAVE_GETHOSTBYNAME_R,1,[Define to 1 if gethostbyname_r is available.]) AC_DEFINE(HAVE_GETHOSTBYNAME_R_5,1,[Define to 1 if gethostbyname_r takes 5 args.]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) AC_MSG_CHECKING([for gethostbyname_r with 3 args]) AC_TRY_COMPILE([ #include <netdb.h> ], [ char *name; struct hostent *he; struct hostent_data data; (void) gethostbyname_r(name, he, &data); ], [ AC_DEFINE(HAVE_GETHOSTBYNAME_R,1,[Define to 1 if gethostbyname_r is available.]) AC_DEFINE(HAVE_GETHOSTBYNAME_R_3,1,[Define to 1 if gethostbyname_r takes 3 args.]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) ]) ]) ]) CFLAGS="$saved_CFLAGS"]) AC_DEFUN([AC_HAVE_GETHOSTBYADDR_R], [saved_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -lnsl" AC_CHECK_FUNC(gethostbyaddr_r, [ AC_MSG_CHECKING([for gethostbyaddr_r with 7 args]) AC_TRY_COMPILE([ #include <netdb.h> ], [ char *addr; int length; int type; struct hostent *result; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, &h_errnop); ], [ AC_DEFINE(HAVE_GETHOSTBYADDR_R,1,[Define to 1 if gethostbyaddr_r is available.]) AC_DEFINE(HAVE_GETHOSTBYADDR_R_7,1,[Define to 1 if gethostbyaddr_r takes 7 args.]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) ]) CFLAGS="$saved_CFLAGS"]) |
From: Stephen D. <sd...@us...> - 2005-10-16 08:38:37
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21427 Modified Files: ChangeLog Makefile configure.in Removed Files: acinclude.m4 Log Message: * Makefile: * acinclude.m4: * m4/dns.m4: Drop acinclude.m4 and move dns checking macros into own file in m4 directory. * configure.in: * nsd/dns.c: Use built-in AC_CHECK_MEMBERS macro. --- acinclude.m4 DELETED --- Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.213 retrieving revision 1.214 diff -C2 -d -r1.213 -r1.214 *** ChangeLog 15 Oct 2005 16:02:15 -0000 1.213 --- ChangeLog 16 Oct 2005 08:38:29 -0000 1.214 *************** *** 1,2 **** --- 1,11 ---- + 2005-10-15 Stephen Deasey <sd...@us...> + + * Makefile: + * acinclude.m4: + * m4/dns.m4: Drop acinclude.m4 and move dns checking macros into + own file in m4 directory. + * configure.in: + * nsd/dns.c: Use built-in AC_CHECK_MEMBERS macro. + 2005-10-15 Zoran Vasiljevic <vas...@us...> Index: Makefile =================================================================== RCS file: /cvsroot/naviserver/naviserver/Makefile,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Makefile 9 Oct 2005 23:43:57 -0000 1.14 --- Makefile 16 Oct 2005 08:38:29 -0000 1.15 *************** *** 36,40 **** dirs = nsthread nsd nssock nscgi nscp nslog nsperm nsdb ! distfiles = $(dirs) doc tcl include tests win32 *.tcl *.m4 configure \ Makefile install-sh missing README ChangeLog NEWS license.terms naviserver.rdf --- 36,40 ---- dirs = nsthread nsd nssock nscgi nscp nslog nsperm nsdb ! distfiles = $(dirs) doc tcl include tests win32 *.tcl configure m4 \ Makefile install-sh missing README ChangeLog NEWS license.terms naviserver.rdf Index: configure.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/configure.in,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** configure.in 15 Oct 2005 15:06:59 -0000 1.13 --- configure.in 16 Oct 2005 08:38:29 -0000 1.14 *************** *** 237,240 **** --- 237,241 ---- fi + # # Darwin version of getnameinfo will not work correctly *************** *** 245,260 **** # ! AC_MSG_CHECKING([sin_len in struct sockaddr_in]) ! AC_TRY_COMPILE([ ! #include <netinet/in.h> ! ], [ ! struct sockaddr_in sa; ! sa.sin_len; ! ], [ ! AC_DEFINE(HAVE_SOCKADDRIN_SIN_LEN, 1, [Should we use the sin_len field of struct sockaddr_in?]) ! AC_MSG_RESULT(yes) ! ], [ ! AC_MSG_RESULT(no) ! ]) # --- 246,253 ---- # ! AC_CHECK_MEMBERS([struct sockaddr_in.sin_len],,,[ ! #include <sys/types.h> ! #include <netinet/in.h>]) ! # |
From: Stephen D. <sd...@us...> - 2005-10-16 08:38:37
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21427/nsd Modified Files: dns.c Log Message: * Makefile: * acinclude.m4: * m4/dns.m4: Drop acinclude.m4 and move dns checking macros into own file in m4 directory. * configure.in: * nsd/dns.c: Use built-in AC_CHECK_MEMBERS macro. Index: dns.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/dns.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dns.c 15 Oct 2005 13:58:11 -0000 1.10 --- dns.c 16 Oct 2005 08:38:29 -0000 1.11 *************** *** 261,265 **** #endif memset(&sa, 0, sizeof(struct sockaddr_in)); ! #ifdef HAVE_SOCKADDRIN_SIN_LEN sa.sin_len = sizeof(struct sockaddr_in); #endif --- 261,265 ---- #endif memset(&sa, 0, sizeof(struct sockaddr_in)); ! #ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sa.sin_len = sizeof(struct sockaddr_in); #endif |
From: Zoran V. <vas...@us...> - 2005-10-15 16:02:26
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19420 Modified Files: ChangeLog Log Message: See file. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.212 retrieving revision 1.213 diff -C2 -d -r1.212 -r1.213 *** ChangeLog 15 Oct 2005 15:02:43 -0000 1.212 --- ChangeLog 15 Oct 2005 16:02:15 -0000 1.213 *************** *** 16,19 **** --- 16,22 ---- Fixed bug while processing results of gethostbyname. + * include/nsthread.h: added definition of MIN/MAX macros + since Solaris does not define them in usual place (sys/param.h) + 2005-10-11 Zoran Vasiljevic <vas...@us...> |
From: Zoran V. <vas...@us...> - 2005-10-15 16:01:14
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18575 Modified Files: nsthread.h Log Message: Added definition of MIN/MAX macros since Solaris does not define those in sys/param.h like other OS'es Index: nsthread.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/nsthread.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** nsthread.h 9 Oct 2005 22:14:53 -0000 1.10 --- nsthread.h 15 Oct 2005 16:01:02 -0000 1.11 *************** *** 149,152 **** --- 149,164 ---- /* + * Some systems (Solaris) lack useful MIN/MAX macros + * normally defined in sys/param.h so do them here. + */ + + #ifndef MIN + # define MIN(a,b) (((a)<(b))?(a):(b)) + #endif + #ifndef MAX + # define MAX(a,b) (((a)>(b))?(a):(b)) + #endif + + /* * Various constants. */ |
From: Zoran V. <vas...@us...> - 2005-10-15 15:07:07
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10002 Modified Files: configure.in Log Message: Ooops... syntax trouble... Index: configure.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/configure.in,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** configure.in 15 Oct 2005 13:57:45 -0000 1.12 --- configure.in 15 Oct 2005 15:06:59 -0000 1.13 *************** *** 203,207 **** have_mtsafe_dns=yes fi ! if test "${have_mtsafe_dns}" != "yes" -a "`uname -s`" != "Darwin"; then AC_HAVE_GETHOSTBYNAME_R --- 203,207 ---- have_mtsafe_dns=yes fi ! if test "${have_mtsafe_dns}" != "yes" \ -a "`uname -s`" != "Darwin"; then AC_HAVE_GETHOSTBYNAME_R |
From: Zoran V. <vas...@us...> - 2005-10-15 15:02:56
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9473 Modified Files: ChangeLog Log Message: See file. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.211 retrieving revision 1.212 diff -C2 -d -r1.211 -r1.212 *** ChangeLog 15 Oct 2005 13:59:03 -0000 1.211 --- ChangeLog 15 Oct 2005 15:02:43 -0000 1.212 *************** *** 4,7 **** --- 4,8 ---- ready-to-fire events in the threads event queue which reference to-be-unspliced channel. + Reformatted, untabified, beautified, commented, ...ed :-) * acinclude.m4: removed m4 checking for structure members |
From: Zoran V. <vas...@us...> - 2005-10-15 14:48:00
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7023/nsd Modified Files: tclfile.c Log Message: Reformatted, untabified... Index: tclfile.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclfile.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tclfile.c 15 Oct 2005 07:18:59 -0000 1.7 --- tclfile.c 15 Oct 2005 14:47:52 -0000 1.8 *************** *** 32,36 **** * tclfile.c -- * ! * Tcl commands that do stuff to the filesystem. */ --- 32,36 ---- * tclfile.c -- * ! * Tcl commands that do stuff to the filesystem. */ [...1263 lines suppressed...] * *---------------------------------------------------------------------- --- 775,785 ---- * UnspliceChannel * ! * Divorces the channel from its owning interp/thread. * * Results: ! * None. * * Side effects: ! * Channel is not accesible by Tcl scripts any more. * *---------------------------------------------------------------------- *************** *** 796,798 **** Tcl_CutChannel(chan); } - --- 821,822 ---- |
From: Zoran V. <vas...@us...> - 2005-10-15 13:59:11
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30915 Modified Files: ChangeLog Log Message: See file Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.210 retrieving revision 1.211 diff -C2 -d -r1.210 -r1.211 *** ChangeLog 15 Oct 2005 07:22:36 -0000 1.210 --- ChangeLog 15 Oct 2005 13:59:03 -0000 1.211 *************** *** 5,8 **** --- 5,18 ---- reference to-be-unspliced channel. + * acinclude.m4: removed m4 checking for structure members + + * configure.in: added checking for sin_len in sockaddr_in + + * nsd/dns.c: added checking for HAVE_MTSAFE_DNS and add + protective locks if not (Darwin). + Added checking for HAVE_SOCKADDRIN_SIN_LEN because Darwin + version of getnameinfo fails if sin_len has unsane values. + Fixed bug while processing results of gethostbyname. + 2005-10-11 Zoran Vasiljevic <vas...@us...> |
From: Zoran V. <vas...@us...> - 2005-10-15 13:58:19
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30846/nsd Modified Files: dns.c Log Message: Added checking for HAVE_MTSAFE_DNS and add protective locks if not (Darwin). Added checking for HAVE_SOCKADDRIN_SIN_LEN because Darwin version of getnameinfo fails if sin_len has unsane values. Fixed bug while processing results of gethostbyname. Index: dns.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/dns.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dns.c 8 Oct 2005 22:03:55 -0000 1.9 --- dns.c 15 Oct 2005 13:58:11 -0000 1.10 *************** *** 256,266 **** int result; int status = NS_FALSE; ! #ifdef __APPLE__ static Ns_Cs cs; Ns_CsEnter(&cs); memset(&sa, 0, sizeof(struct sockaddr_in)); sa.sin_len = sizeof(struct sockaddr_in); - #else - memset(&sa, 0, sizeof(struct sockaddr_in)); #endif sa.sin_family = AF_INET; --- 256,266 ---- int result; int status = NS_FALSE; ! #ifndef HAVE_MTSAFE_DNS static Ns_Cs cs; Ns_CsEnter(&cs); + #endif memset(&sa, 0, sizeof(struct sockaddr_in)); + #ifdef HAVE_SOCKADDRIN_SIN_LEN sa.sin_len = sizeof(struct sockaddr_in); #endif sa.sin_family = AF_INET; *************** *** 275,279 **** Ns_Log(Error, "dns: getnameinfo failed: %s", gai_strerror(result)); } ! #ifdef __APPLE__ Ns_CsLeave(&cs); #endif --- 275,279 ---- Ns_Log(Error, "dns: getnameinfo failed: %s", gai_strerror(result)); } ! #ifndef HAVE_MTSAFE_DNS Ns_CsLeave(&cs); #endif *************** *** 349,353 **** int result; int status = NS_FALSE; ! #ifdef __APPLE__ static Ns_Cs cs; Ns_CsEnter(&cs); --- 349,353 ---- int result; int status = NS_FALSE; ! #ifndef HAVE_MTSAFE_DNS static Ns_Cs cs; Ns_CsEnter(&cs); *************** *** 369,373 **** gai_strerror(result)); } ! #ifdef __APPLE__ Ns_CsLeave(&cs); #endif --- 369,373 ---- gai_strerror(result)); } ! #ifndef HAVE_MTSAFE_DNS Ns_CsLeave(&cs); #endif *************** *** 409,418 **** LogError("gethostbyname_r", h_errnop); } else { ! ptr = (struct in_addr *) he.h_addr_list[i]; ! while (ptr != NULL) { ia.s_addr = ptr->s_addr; Tcl_DStringAppendElement(dsPtr, ns_inet_ntoa(ia)); status = NS_TRUE; - ptr = (struct in_addr *) he.h_addr_list[++i]; } } --- 409,416 ---- LogError("gethostbyname_r", h_errnop); } else { ! while ((ptr = (struct in_addr *) he.h_addr_list[i++]) != NULL) { ia.s_addr = ptr->s_addr; Tcl_DStringAppendElement(dsPtr, ns_inet_ntoa(ia)); status = NS_TRUE; } } *************** *** 444,453 **** LogError("gethostbyname", h_errno); } else { ! ptr = (struct in_addr *) he->h_addr_list[i]; ! while (ptr != NULL) { ia.s_addr = ptr->s_addr; Tcl_DStringAppendElement(dsPtr, ns_inet_ntoa(ia)); status = NS_TRUE; - ptr = (struct in_addr *) he->h_addr_list[++i]; } } --- 442,449 ---- LogError("gethostbyname", h_errno); } else { ! while ((ptr = (struct in_addr *) he->h_addr_list[i++]) != NULL) { ia.s_addr = ptr->s_addr; Tcl_DStringAppendElement(dsPtr, ns_inet_ntoa(ia)); status = NS_TRUE; } } |
From: Zoran V. <vas...@us...> - 2005-10-15 13:57:54
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30802 Modified Files: configure.in Log Message: Added checking for sin_len in sockaddr_in Index: configure.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/configure.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** configure.in 9 Oct 2005 23:43:57 -0000 1.11 --- configure.in 15 Oct 2005 13:57:45 -0000 1.12 *************** *** 80,86 **** TEA_TIME_HANDLER # ! # Modify SHLIB_LD from tclConfig.sh as we specifically name ! # shared library _init functions. # --- 80,87 ---- TEA_TIME_HANDLER + # ! # Modify SHLIB_LD from tclConfig.sh as we specifically ! # name shared library _init functions. # *************** *** 88,131 **** system=`uname` case "$system" in ! Darwin) ! LDLIB="cc -dynamiclib -install_name \$(INSTLIB)/\$(LIBFILE)" ! LDSO="cc -bundle" ! CCRFLAG= ! LDRFLAG= ! CCRPATHS= ! LDRPATHS= ! ;; ! *) ! LDLIB="$SHLIB_LD" ! case "$LDLIB" in ! *gcc*) ! LDLIB="$LDLIB -nostartfiles" ! ;; ! esac ! CCRPATH="\$(CCRFLAG)\$(INSTLIB)" ! LDRPATH="\$(LDRFLAG)\$(INSTLIB)" ! if test "$TCL_EXEC_PREFIX" != "$prefix" ! then ! 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)" ! LDRPATHS="\$(LDRPATH)" ! CCRFLAG=$TCL_CC_SEARCH_FLAGS ! LDRFLAG=$TCL_LD_SEARCH_FLAGS ! if test "$CCRFLAG" = "" ; then ! CCRPATH= ! fi ! if test "$LDRFLAG" = "" ; then ! LDRPATH= ! fi ! ;; esac SRCDIR=`cd $srcdir; pwd` NAVISERVER=$prefix --- 89,131 ---- system=`uname` case "$system" in ! Darwin) ! LDLIB="cc -dynamiclib -install_name \$(INSTLIB)/\$(LIBFILE)" ! LDSO="cc -bundle" ! CCRFLAG= ! LDRFLAG= ! CCRPATHS= ! LDRPATHS= ! ;; ! *) ! LDLIB="$SHLIB_LD" ! case "$LDLIB" in ! *gcc*) ! LDLIB="$LDLIB -nostartfiles" ! ;; ! esac ! CCRPATH="\$(CCRFLAG)\$(INSTLIB)" ! LDRPATH="\$(LDRFLAG)\$(INSTLIB)" ! if test "$TCL_EXEC_PREFIX" != "$prefix"; then ! 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)" ! LDRPATHS="\$(LDRPATH)" ! CCRFLAG=$TCL_CC_SEARCH_FLAGS ! LDRFLAG=$TCL_LD_SEARCH_FLAGS ! if test "$CCRFLAG" = "" ; then ! CCRPATH= ! fi ! if test "$LDRFLAG" = "" ; then ! LDRPATH= ! fi ! ;; esac + SRCDIR=`cd $srcdir; pwd` NAVISERVER=$prefix *************** *** 141,144 **** --- 141,145 ---- AC_SUBST(NAVISERVER) + # # Additional checks. *************** *** 147,165 **** AC_CHECK_HEADERS(inttypes.h) 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.]),) ! AC_CHECK_HEADER(dl.h, AC_DEFINE(USE_DLSHL,1,[Define to 1 if the <dl.h> header should be used.]),) AC_MSG_CHECKING([need for dup high]) AC_TRY_RUN([ ! #include <stdio.h> ! int ! main(int argc, char **argv) ! { return (sizeof(stdout->_file) == 1) ? 0 : 1; ! }], AC_DEFINE(USE_DUPHIGH,1,[need for dup high]) as_ok=yes, as_ok=no, as_ok=no) AC_MSG_RESULT($as_ok) # # Normally, we'd link the resulting server image ! # dynamically. In some cases it is however more # appropriate to build it as a monolithic image. # --- 148,165 ---- AC_CHECK_HEADERS(inttypes.h) 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.]),) ! AC_CHECK_HEADER(dl.h, AC_DEFINE(USE_DLSHL, 1, [Define to 1 if the <dl.h> header should be used.]),) AC_MSG_CHECKING([need for dup high]) AC_TRY_RUN([ ! #include <stdio.h> ! int main(int argc, char **argv) { return (sizeof(stdout->_file) == 1) ? 0 : 1; ! } ! ], AC_DEFINE(USE_DUPHIGH, 1, [need for dup high]) as_ok=yes, as_ok=no, as_ok=no) AC_MSG_RESULT($as_ok) # # Normally, we'd link the resulting server image ! # dynamically. In some cases it is however more # appropriate to build it as a monolithic image. # *************** *** 167,237 **** AC_MSG_CHECKING([how to build server image]) AC_ARG_ENABLE(shared, ! [ --enable-shared build and link with shared libraries [--enable-shared]], ! shared_ok=$enable_shared, shared_ok=yes) if test "$shared_ok" = "yes" ; then ! if test "${TCL_SHARED_BUILD}" != "1" ; then ! AC_MSG_ERROR([must build tcl with --enable-shared]) ! fi ! STATIC_BUILD=0 ! AC_MSG_RESULT([shared]) else ! if test "${TCL_SHARED_BUILD}" != "0" ; then ! AC_MSG_ERROR([must build tcl with --disable-shared]) ! fi ! STATIC_BUILD=1 ! AC_MSG_RESULT([static]) fi AC_SUBST(STATIC_BUILD) AC_CACHE_CHECK([for shared libgcc], ac_cv_shared_libgcc, [ ! ac_save_LIBS="$LIBS" ! LIBS="-lgcc_s $LIBS" ! AC_TRY_LINK(, [return 0], ac_cv_shared_libgcc=yes, ac_cv_shared_libgcc=no) ! LIBS="$ac_save_LIBS" ]) if test "$ac_cv_shared_libgcc" = "yes" ; then ! LIBS="-lgcc_s $LIBS" fi ! has_threadsafe_dns=no AC_CHECK_LIB(socket, getaddrinfo) AC_CHECK_LIB(socket, getnameinfo) AC_CHECK_FUNCS(getaddrinfo getnameinfo) if test "${ac_cv_func_getaddrinfo}" = "yes" \ ! -a "${ac_cv_func_getnameinfo}" = "yes" \ ! -a "`uname -s`" != "Darwin"; then ! has_threadsafe_dns=yes fi ! if test "${has_threadsafe_dns}" != "yes" ; then ! AC_HAVE_GETHOSTBYNAME_R ! AC_HAVE_GETHOSTBYADDR_R ! if test "${ac_cv_func_gethostbyname_r}" = "yes" \ ! -a "${ac_cv_func_gethostbyaddr_r}" = "yes" ; then ! has_threadsafe_dns=yes ! fi fi ! if test "${has_threadsafe_dns}" != "yes" ; then ! AC_MSG_WARN([DNS queries will use MT-unsafe calls which could result in server instability]) fi AC_MSG_CHECKING([whether to include zlib compression support]) AC_ARG_WITH(zlib, ! [ --with-zlib[=DIR] build and link with Zlib [--with-zlib]], ! [ ! ac_zlib=$withval ! if test "${ac_zlib}" != "no" ; then ! ac_zlib=yes ! if test -d "$withval" ; then ! CPPFLAGS="$CPPFLAGS -I$withval/include" ! LDFLAGS="$LDFLAGS -L$withval/lib" ! fi ! fi ! ], [ac_zlib=yes]) AC_MSG_RESULT($ac_zlib) if test "${ac_zlib}" = "yes" ; then ! AC_CHECK_HEADERS(zlib.h) ! AC_CHECK_LIB(z, compress2) fi # --- 167,260 ---- AC_MSG_CHECKING([how to build server image]) AC_ARG_ENABLE(shared, ! [ --enable-shared build and link with shared libraries [--enable-shared]], ! shared_ok=$enable_shared, shared_ok=yes) if test "$shared_ok" = "yes" ; then ! if test "${TCL_SHARED_BUILD}" != "1" ; then ! AC_MSG_ERROR([must build tcl with --enable-shared]) ! fi ! STATIC_BUILD=0 ! AC_MSG_RESULT([shared]) else ! if test "${TCL_SHARED_BUILD}" != "0" ; then ! AC_MSG_ERROR([must build tcl with --disable-shared]) ! fi ! STATIC_BUILD=1 ! AC_MSG_RESULT([static]) fi AC_SUBST(STATIC_BUILD) AC_CACHE_CHECK([for shared libgcc], ac_cv_shared_libgcc, [ ! ac_save_LIBS="$LIBS" ! LIBS="-lgcc_s $LIBS" ! AC_TRY_LINK(, [return 0], ac_cv_shared_libgcc=yes, ac_cv_shared_libgcc=no) ! LIBS="$ac_save_LIBS" ]) if test "$ac_cv_shared_libgcc" = "yes" ; then ! LIBS="-lgcc_s $LIBS" fi ! have_mtsafe_dns=no AC_CHECK_LIB(socket, getaddrinfo) AC_CHECK_LIB(socket, getnameinfo) AC_CHECK_FUNCS(getaddrinfo getnameinfo) if test "${ac_cv_func_getaddrinfo}" = "yes" \ ! -a "${ac_cv_func_getnameinfo}" = "yes" \ ! -a "`uname -s`" != "Darwin"; then ! have_mtsafe_dns=yes fi ! if test "${have_mtsafe_dns}" != "yes" ! -a "`uname -s`" != "Darwin"; then ! AC_HAVE_GETHOSTBYNAME_R ! AC_HAVE_GETHOSTBYADDR_R ! if test "${ac_cv_func_gethostbyname_r}" = "yes" \ ! -a "${ac_cv_func_gethostbyaddr_r}" = "yes" ; then ! have_mtsafe_dns=yes ! fi fi ! if test "${have_mtsafe_dns}" != "yes" ; then ! AC_MSG_WARN([DNS queries use MT-unsafe calls which could result in server instability]) ! else ! AC_DEFINE(HAVE_MTSAFE_DNS, 1, [Define to 1 if DNS calls are MT-safe]) fi AC_MSG_CHECKING([whether to include zlib compression support]) AC_ARG_WITH(zlib, ! [ --with-zlib[=DIR] build and link with Zlib [--with-zlib]], ! [ ! ac_zlib=$withval ! if test "${ac_zlib}" != "no" ; then ! ac_zlib=yes ! if test -d "$withval" ; then ! CPPFLAGS="$CPPFLAGS -I$withval/include" ! LDFLAGS="$LDFLAGS -L$withval/lib" ! fi ! fi ! ], [ac_zlib=yes]) AC_MSG_RESULT($ac_zlib) if test "${ac_zlib}" = "yes" ; then ! AC_CHECK_HEADERS(zlib.h) ! AC_CHECK_LIB(z, compress2) fi + # + # Darwin version of getnameinfo will not work correctly + # if we do not explicitly set sin_len element of the + # struct sockaddr_in to the total size of the structure. + # Some OS variants however do not have the sin_len member + # so test if this is the case. + # + + AC_MSG_CHECKING([sin_len in struct sockaddr_in]) + AC_TRY_COMPILE([ + #include <netinet/in.h> + ], [ + struct sockaddr_in sa; + sa.sin_len; + ], [ + AC_DEFINE(HAVE_SOCKADDRIN_SIN_LEN, 1, [Should we use the sin_len field of struct sockaddr_in?]) + AC_MSG_RESULT(yes) + ], [ + AC_MSG_RESULT(no) + ]) # |
From: Zoran V. <vas...@us...> - 2005-10-15 13:57:32
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30759 Modified Files: acinclude.m4 Log Message: Removed m4 checking for structure members Index: acinclude.m4 =================================================================== RCS file: /cvsroot/naviserver/naviserver/acinclude.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** acinclude.m4 9 Oct 2005 23:43:57 -0000 1.1 --- acinclude.m4 15 Oct 2005 13:57:23 -0000 1.2 *************** *** 124,167 **** ]) CFLAGS="$saved_CFLAGS"]) - - - dnl @synopsis AC_CHECK_STRUCT_FOR(INCLUDES,STRUCT,MEMBER,DEFINE,[no]) - dnl - dnl Checks STRUCT for MEMBER and defines DEFINE if found. - dnl - dnl @version $Id$ - dnl @author Wes Hardaker <wjh...@uc...> - dnl - AC_DEFUN([AC_CHECK_STRUCT_FOR],[ - ac_safe_struct=`echo "$2" | sed 'y%./+-%__p_%'` - ac_safe_member=`echo "$3" | sed 'y%./+-%__p_%'` - ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}" - changequote(, )dnl - ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - changequote([, ])dnl - - AC_MSG_CHECKING([for $2.$3]) - AC_CACHE_VAL($ac_safe_all, - [ - if test "x$4" = "x"; then - defineit="= 0" - elif test "x$4" = "xno"; then - defineit="" - else - defineit="$4" - fi - AC_TRY_COMPILE([ - $1 - ],[ - struct $2 testit; - testit.$3 $defineit; - ], eval "${ac_safe_all}=yes", eval "${ac_safe_all}=no" ) - ]) - - if eval "test \"x$`echo ${ac_safe_all}`\" = \"xyes\""; then - AC_MSG_RESULT(yes) - AC_DEFINE_UNQUOTED($ac_uc_define) - else - AC_MSG_RESULT(no) - fi - ]) --- 124,125 ---- |
From: Zoran V. <vas...@us...> - 2005-10-15 07:22:44
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32667 Modified Files: ChangeLog Log Message: See file. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.209 retrieving revision 1.210 diff -C2 -d -r1.209 -r1.210 *** ChangeLog 11 Oct 2005 21:21:04 -0000 1.209 --- ChangeLog 15 Oct 2005 07:22:36 -0000 1.210 *************** *** 1,2 **** --- 1,8 ---- + 2005-10-15 Zoran Vasiljevic <vas...@us...> + + * nsd/tclfile.c (UnspliceChannel): disable any potential + ready-to-fire events in the threads event queue which + reference to-be-unspliced channel. + 2005-10-11 Zoran Vasiljevic <vas...@us...> |
From: Zoran V. <vas...@us...> - 2005-10-15 07:19:07
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32167 Modified Files: tclfile.c Log Message: Improved UnspliceChannel to properly disable ready-to-fire events still sitting in the threads event queue prior detachment of the channel. Index: tclfile.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclfile.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tclfile.c 8 Oct 2005 12:06:07 -0000 1.6 --- tclfile.c 15 Oct 2005 07:18:59 -0000 1.7 *************** *** 764,770 **** UnspliceChannel(Tcl_Interp *interp, Tcl_Channel chan) { Tcl_ClearChannelHandlers(chan); ! Tcl_RegisterChannel((Tcl_Interp*)NULL, chan); /* Prevent closing */ Tcl_UnregisterChannel(interp, chan); Tcl_CutChannel(chan); } --- 764,797 ---- UnspliceChannel(Tcl_Interp *interp, Tcl_Channel chan) { + Tcl_ChannelType *chanTypePtr; + Tcl_DriverWatchProc *watchProc; + Tcl_ClearChannelHandlers(chan); ! ! chanTypePtr = Tcl_GetChannelType(chan); ! watchProc = Tcl_ChannelWatchProc(chanTypePtr); ! ! /* ! * This effectively disables processing of pending ! * events which are ready to fire for the given ! * channel. If we do not do this, events will hit ! * the detached channel which is potentially being ! * owned by some other thread. This will wreck havoc ! * on our memory and eventually badly hurt us... ! */ ! ! if (watchProc) { ! (*watchProc)(Tcl_GetChannelInstanceData(chan), 0); ! } ! ! /* ! * Artificially bump the channel reference count ! * which protects us from channel being closed ! * during the Tcl_UnregisterChannel(). ! */ ! ! Tcl_RegisterChannel((Tcl_Interp *) NULL, chan); Tcl_UnregisterChannel(interp, chan); + Tcl_CutChannel(chan); } |
From: Zoran V. <vas...@us...> - 2005-10-11 21:21:13
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19526 Modified Files: ChangeLog Log Message: See file. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.208 retrieving revision 1.209 diff -C2 -d -r1.208 -r1.209 *** ChangeLog 10 Oct 2005 09:35:15 -0000 1.208 --- ChangeLog 11 Oct 2005 21:21:04 -0000 1.209 *************** *** 1,2 **** --- 1,7 ---- + 2005-10-11 Zoran Vasiljevic <vas...@us...> + + * nsd/nsmain.c (StartWatchedServer): clear signal handlers + before re-starting the server. + 2005-10-10 Zoran Vasiljevic <vas...@us...> |
From: Zoran V. <vas...@us...> - 2005-10-11 21:19:40
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18977/nsd Modified Files: nsmain.c Log Message: StartWathedServer clears signal handlers before re-starting the server. Index: nsmain.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nsmain.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** nsmain.c 9 Oct 2005 22:27:24 -0000 1.22 --- nsmain.c 11 Oct 2005 21:19:31 -0000 1.23 *************** *** 60,64 **** #ifdef __APPLE__ ! # define WAKEUP_IN_SECONDS 600 /* Wakeup watchdog after somuch seconds */ #else # define WAKEUP_IN_SECONDS 0 /* Wakeup watchdog after somuch seconds */ --- 60,64 ---- #ifdef __APPLE__ ! # define WAKEUP_IN_SECONDS 600 /* Wakeup watchdog after somany seconds */ #else # define WAKEUP_IN_SECONDS 0 /* Wakeup watchdog after somuch seconds */ *************** *** 1177,1181 **** WatchdogSIGALRMHandler(int sig) { ! if (kill((pid_t) nsconf.pid, 0) && errno == ESRCH) { SysLog(LOG_WARNING, "watchdog: server %d terminated?", nsconf.pid); nsconf.pid = 0; --- 1177,1181 ---- WatchdogSIGALRMHandler(int sig) { ! if (nsconf.pid && kill((pid_t) nsconf.pid, 0) && errno == ESRCH) { SysLog(LOG_WARNING, "watchdog: server %d terminated?", nsconf.pid); nsconf.pid = 0; *************** *** 1205,1209 **** { int ret, status; ! pid_t pid; char *msg; --- 1205,1209 ---- { int ret, status; ! pid_t pid, srvpid = nsconf.pid; char *msg; *************** *** 1226,1230 **** } ! SysLog(LOG_NOTICE, "watchdog: server %d %s (%d).", nsconf.pid, msg, ret); return ret ? NS_ERROR : NS_OK; --- 1226,1231 ---- } ! nsconf.pid = 0; ! SysLog(LOG_NOTICE, "watchdog: server %d %s (%d).", srvpid, msg, ret); return ret ? NS_ERROR : NS_OK; *************** *** 1252,1256 **** StartWatchedServer(void) { ! unsigned int setSigHandlers=0, startTime, numRestarts=0, restartWait=0; struct itimerval timer; --- 1253,1257 ---- StartWatchedServer(void) { ! unsigned int startTime, numRestarts = 0, restartWait = 0; struct itimerval timer; *************** *** 1264,1267 **** --- 1265,1274 ---- sleep(restartWait); } + if (WAKEUP_IN_SECONDS) { + memset(&timer, 0, sizeof(struct itimerval)); + setitimer(ITIMER_REAL, &timer, NULL); + ns_signal(SIGALRM, SIG_DFL); + } + ns_signal(SIGTERM, SIG_DFL); nsconf.pid = ns_fork(); if (nsconf.pid == -1) { *************** *** 1285,1313 **** * the server is still present. This tries to solve issues with * signal delivery on some systems where waitpid() fails to report ! * process exitus (i.e. it is just stuck). */ ! ! if (setSigHandlers == 0) { ! setSigHandlers = 1; timer.it_interval.tv_sec = WAKEUP_IN_SECONDS; timer.it_value.tv_sec = timer.it_interval.tv_sec; ! timer.it_value.tv_usec = timer.it_interval.tv_usec = 0; ! if (timer.it_value.tv_sec || timer.it_value.tv_usec) { ! setitimer(ITIMER_REAL, &timer, NULL); ! ns_signal(SIGALRM, WatchdogSIGALRMHandler); ! } ! ns_signal(SIGTERM, WatchdogSIGTERMHandler); } ! startTime = time(NULL); - if (WaitForServer() == NS_OK) { break; } - if ((time(NULL) - startTime) > MIN_WORK_SECONDS) { restartWait = numRestarts = 0; } - if (++numRestarts > MAX_NUM_RESTARTS) { SysLog(LOG_WARNING, "watchdog: exceeded restart limit of %d", --- 1292,1312 ---- * the server is still present. This tries to solve issues with * signal delivery on some systems where waitpid() fails to report ! * process exitus (i.e. just stuck, although the process is gone). */ ! ! if (WAKEUP_IN_SECONDS) { timer.it_interval.tv_sec = WAKEUP_IN_SECONDS; timer.it_value.tv_sec = timer.it_interval.tv_sec; ! setitimer(ITIMER_REAL, &timer, NULL); ! ns_signal(SIGALRM, WatchdogSIGALRMHandler); } ! ns_signal(SIGTERM, WatchdogSIGTERMHandler); startTime = time(NULL); if (WaitForServer() == NS_OK) { break; } if ((time(NULL) - startTime) > MIN_WORK_SECONDS) { restartWait = numRestarts = 0; } if (++numRestarts > MAX_NUM_RESTARTS) { SysLog(LOG_WARNING, "watchdog: exceeded restart limit of %d", *************** *** 1315,1319 **** break; } - restartWait *= 2; if (restartWait > MAX_RESTART_SECONDS) { --- 1314,1317 ---- *************** *** 1322,1326 **** restartWait = 1; } - } while (!watchdogExit); --- 1320,1323 ---- |
From: Zoran V. <vas...@us...> - 2005-10-10 13:33:24
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18687/nsd Modified Files: fastpath.c Log Message: Fixed one Tcl_Stat() usage which was wrong. Index: fastpath.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/fastpath.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** fastpath.c 10 Oct 2005 13:20:31 -0000 1.23 --- fastpath.c 10 Oct 2005 13:33:23 -0000 1.24 *************** *** 150,158 **** NsServer *servPtr; ! if (!FastStat(file, &st)) { return Ns_ConnReturnNotFound(conn); } ! ! server = Ns_ConnServer(conn); servPtr = NsGetServer(server); --- 150,158 ---- NsServer *servPtr; ! if (FastStat(file, &st) == 0) { return Ns_ConnReturnNotFound(conn); } ! ! server = Ns_ConnServer(conn); servPtr = NsGetServer(server); *************** *** 479,483 **** FastStat(CONST char *file, Tcl_StatBuf *stPtr) { ! if (Tcl_Stat(file, stPtr) != 0) { if (Tcl_GetErrno() != ENOENT && Tcl_GetErrno() != EACCES) { Ns_Log(Error, "fastpath: stat(%s) failed: %s", --- 479,491 ---- FastStat(CONST char *file, Tcl_StatBuf *stPtr) { ! Tcl_Obj *path; ! int status; ! ! path = Tcl_NewStringObj(file, -1); ! Tcl_IncrRefCount(path); ! status = Tcl_FSStat(path, stPtr); ! Tcl_DecrRefCount(path); ! ! if (status != 0) { if (Tcl_GetErrno() != ENOENT && Tcl_GetErrno() != EACCES) { Ns_Log(Error, "fastpath: stat(%s) failed: %s", |
From: Zoran V. <vas...@us...> - 2005-10-10 13:20:36
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15276/nsd Modified Files: adpeval.c fastpath.c Log Message: Use Tcl_FSStat and Tcl_StatBuf instead of the Tcl_Stat compat wrapper. Index: fastpath.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/fastpath.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** fastpath.c 10 Oct 2005 09:32:04 -0000 1.22 --- fastpath.c 10 Oct 2005 13:20:31 -0000 1.23 *************** *** 80,84 **** static void DecrEntry (File *filePtr); static int UrlIs (CONST char *server, CONST char *url, int dir); ! static int FastStat (CONST char *file, struct stat *stPtr); static int FastGetRestart (Ns_Conn *conn, CONST char *page); static int ParseRange (Ns_Conn *conn, Range *rangesPtr); --- 80,84 ---- static void DecrEntry (File *filePtr); static int UrlIs (CONST char *server, CONST char *url, int dir); ! static int FastStat (CONST char *file, Tcl_StatBuf *stPtr); static int FastGetRestart (Ns_Conn *conn, CONST char *page); static int ParseRange (Ns_Conn *conn, Range *rangesPtr); *************** *** 86,90 **** static int FastReturn (NsServer *servPtr, Ns_Conn *conn, int status, CONST char *type, CONST char *file, ! struct stat *stPtr); static int ReturnRange (Ns_Conn *conn, Range *rangesPtr, Tcl_Channel chan, --- 86,90 ---- static int FastReturn (NsServer *servPtr, Ns_Conn *conn, int status, CONST char *type, CONST char *file, ! Tcl_StatBuf *stPtr); static int ReturnRange (Ns_Conn *conn, Range *rangesPtr, Tcl_Channel chan, *************** *** 146,150 **** Ns_ConnReturnFile(Ns_Conn *conn, int status, CONST char *type, CONST char *file) { ! struct stat st; char *server; NsServer *servPtr; --- 146,150 ---- Ns_ConnReturnFile(Ns_Conn *conn, int status, CONST char *type, CONST char *file) { ! Tcl_StatBuf st; char *server; NsServer *servPtr; *************** *** 269,282 **** UrlIs(CONST char *server, CONST char *url, int dir) { ! Ns_DString ds; ! int is = NS_FALSE; ! struct stat st; Ns_DStringInit(&ds); ! if (Ns_UrlToFile(&ds, server, url) == NS_OK ! && Tcl_Stat(ds.string, &st) == 0 ! && ((dir && S_ISDIR(st.st_mode)) ! || (dir == NS_FALSE && S_ISREG(st.st_mode)))) { ! is = NS_TRUE; } Ns_DStringFree(&ds); --- 269,288 ---- UrlIs(CONST char *server, CONST char *url, int dir) { ! Ns_DString ds; ! int status, is = NS_FALSE; ! Tcl_Obj *path; ! Tcl_StatBuf st; Ns_DStringInit(&ds); ! if (Ns_UrlToFile(&ds, server, url) == NS_OK) { ! path = Tcl_NewStringObj(ds.string, -1); ! Tcl_IncrRefCount(path); ! status = Tcl_FSStat(path, &st); ! Tcl_DecrRefCount(path); ! if (status == 0 ! && ((dir && S_ISDIR(st.st_mode)) ! || (dir == NS_FALSE && S_ISREG(st.st_mode)))) { ! is = NS_TRUE; ! } } Ns_DStringFree(&ds); *************** *** 334,342 **** NsFastGet(void *arg, Ns_Conn *conn) { ! Ns_DString ds; ! NsServer *servPtr = arg; ! char *url = conn->request->url; ! int result, i; ! struct stat st; Ns_DStringInit(&ds); --- 340,349 ---- NsFastGet(void *arg, Ns_Conn *conn) { ! Ns_DString ds; ! NsServer *servPtr = arg; ! char *url = conn->request->url; ! int status, result, i; ! Tcl_Obj *path; ! Tcl_StatBuf st; Ns_DStringInit(&ds); *************** *** 365,369 **** } Ns_DStringVarAppend(&ds, "/", servPtr->fastpath.dirv[i], NULL); ! if (Tcl_Stat(ds.string, &st) == 0 && S_ISREG(st.st_mode)) { if (url[strlen(url) - 1] != '/') { Ns_DStringTrunc(&ds, 0); --- 372,380 ---- } Ns_DStringVarAppend(&ds, "/", servPtr->fastpath.dirv[i], NULL); ! path = Tcl_NewStringObj(ds.string, -1); ! Tcl_IncrRefCount(path); ! status = Tcl_FSStat(path, &st); ! Tcl_DecrRefCount(path); ! if (status == 0 && S_ISREG(st.st_mode)) { if (url[strlen(url) - 1] != '/') { Ns_DStringTrunc(&ds, 0); *************** *** 466,470 **** static int ! FastStat(CONST char *file, struct stat *stPtr) { if (Tcl_Stat(file, stPtr) != 0) { --- 477,481 ---- static int ! FastStat(CONST char *file, Tcl_StatBuf *stPtr) { if (Tcl_Stat(file, stPtr) != 0) { *************** *** 498,502 **** static int FastReturn(NsServer *servPtr, Ns_Conn *conn, int status, CONST char *type, ! CONST char *file, struct stat *stPtr) { int new, nread, result = NS_ERROR; --- 509,513 ---- static int FastReturn(NsServer *servPtr, Ns_Conn *conn, int status, CONST char *type, ! CONST char *file, Tcl_StatBuf *stPtr) { int new, nread, result = NS_ERROR; Index: adpeval.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/adpeval.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** adpeval.c 10 Oct 2005 09:32:03 -0000 1.7 --- adpeval.c 10 Oct 2005 13:20:31 -0000 1.8 *************** *** 94,98 **** */ ! static Page *ParseFile(NsInterp *itPtr, CONST char *file, struct stat *stPtr); static void PushFrame(NsInterp *itPtr, Frame *framePtr, CONST char *file, int objc, Tcl_Obj *objv[], Tcl_DString *outputPtr); --- 94,98 ---- */ ! static Page *ParseFile(NsInterp *itPtr, CONST char *file, Tcl_StatBuf *stPtr); static void PushFrame(NsInterp *itPtr, Frame *framePtr, CONST char *file, int objc, Tcl_Obj *objv[], Tcl_DString *outputPtr); *************** *** 280,285 **** Tcl_Interp *interp = itPtr->interp; Tcl_HashEntry *hPtr; ! struct stat st; ! Ns_DString tmp, path; Frame frame; InterpPage *ipagePtr; --- 280,286 ---- Tcl_Interp *interp = itPtr->interp; Tcl_HashEntry *hPtr; ! Tcl_StatBuf st; ! Tcl_Obj *path; ! Ns_DString tmp, ds; Frame frame; InterpPage *ipagePtr; *************** *** 292,298 **** ipagePtr = NULL; pagePtr = NULL; - status = TCL_ERROR; /* Assume error until accomplished success */ Ns_DStringInit(&tmp); ! Ns_DStringInit(&path); key = (char *) &ukey; --- 293,298 ---- ipagePtr = NULL; pagePtr = NULL; Ns_DStringInit(&tmp); ! Ns_DStringInit(&ds); key = (char *) &ukey; *************** *** 302,312 **** if (Ns_PathIsAbsolute(file)) { ! Ns_NormalizePath(&path, file); } else { Ns_MakePath(&tmp, itPtr->adp.cwd, file, NULL); ! Ns_NormalizePath(&path, tmp.string); Ns_DStringTrunc(&tmp, 0); } ! file = path.string; /* --- 302,312 ---- if (Ns_PathIsAbsolute(file)) { ! Ns_NormalizePath(&ds, file); } else { Ns_MakePath(&tmp, itPtr->adp.cwd, file, NULL); ! Ns_NormalizePath(&ds, tmp.string); Ns_DStringTrunc(&tmp, 0); } ! file = ds.string; /* *************** *** 331,334 **** --- 331,335 ---- (char *) Tcl_GetStringResult(interp)); itPtr->adp.exception = ADP_ABORT; + status = TCL_ERROR; goto done; } *************** *** 353,357 **** */ ! if (Tcl_Stat(file, &st) != 0) { Tcl_AppendResult(interp, "could not stat \"", file, "\": ", Tcl_PosixError(interp), NULL); --- 354,363 ---- */ ! path = Tcl_NewStringObj(file, -1); ! Tcl_IncrRefCount(path); ! status = Tcl_FSStat(path, &st); ! Tcl_DecrRefCount(path); ! ! if (status != 0) { Tcl_AppendResult(interp, "could not stat \"", file, "\": ", Tcl_PosixError(interp), NULL); *************** *** 463,466 **** --- 469,474 ---- ++ipagePtr->pagePtr->evals; Ns_MutexUnlock(&servPtr->adp.pagelock); + } else { + status = TCL_ERROR; } if (itPtr->adp.debugLevel > 0) { *************** *** 469,473 **** done: ! Ns_DStringFree(&path); Ns_DStringFree(&tmp); --- 477,481 ---- done: ! Ns_DStringFree(&ds); Ns_DStringFree(&tmp); *************** *** 689,697 **** static Page * ! ParseFile(NsInterp *itPtr, CONST char *file, struct stat *stPtr) { Tcl_Interp *interp = itPtr->interp; Tcl_Encoding encoding; Tcl_DString utf; char *page, *buf; int n, trys, status; --- 697,706 ---- static Page * ! ParseFile(NsInterp *itPtr, CONST char *file, Tcl_StatBuf *stPtr) { Tcl_Interp *interp = itPtr->interp; Tcl_Encoding encoding; Tcl_DString utf; + Tcl_Obj *path; char *page, *buf; int n, trys, status; *************** *** 719,723 **** */ ! status = Tcl_Stat(file, stPtr); if (status != 0) { Tcl_AppendResult(interp, "could not stat \"", file, "\": ", --- 728,736 ---- */ ! path = Tcl_NewStringObj(file, -1); ! Tcl_IncrRefCount(path); ! status = Tcl_FSStat(path, stPtr); ! Tcl_DecrRefCount(path); ! if (status != 0) { Tcl_AppendResult(interp, "could not stat \"", file, "\": ", |
From: Zoran V. <vas...@us...> - 2005-10-10 09:35:18
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29404 Modified Files: ChangeLog Log Message: See file. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.207 retrieving revision 1.208 diff -C2 -d -r1.207 -r1.208 *** ChangeLog 9 Oct 2005 23:43:56 -0000 1.207 --- ChangeLog 10 Oct 2005 09:35:15 -0000 1.208 *************** *** 1,2 **** --- 1,9 ---- + 2005-10-10 Zoran Vasiljevic <vas...@us...> + + * nsd/adprequest.c Removed OS/FS fallbacks. Now use TclVFS + * nsd/adpeval.c wrappers always. This simplifies code + * nsd/fastpath.c and (hopefully) does not introduce any + * nsd/urlopen.c (perceivable) speed penalties. + 2005-10-09 Stephen Deasey <sd...@us...> |
From: Zoran V. <vas...@us...> - 2005-10-10 09:32:08
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28623/nsd Modified Files: adpeval.c adprequest.c fastpath.c urlopen.c Log Message: Removed OS/FS fallbacks. Now use TclVFS wrappers always. This simplifies code and (hopefully) does not introduce any (perceivable) speed penalties. Index: fastpath.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/fastpath.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** fastpath.c 8 Oct 2005 12:06:07 -0000 1.21 --- fastpath.c 10 Oct 2005 09:32:04 -0000 1.22 *************** *** 88,94 **** struct stat *stPtr); ! static int ReturnRange (Ns_Conn *conn, Range *rangesPtr, int fd, ! Tcl_Channel chan, CONST char *data, ! int len, CONST char *type); /* --- 88,93 ---- struct stat *stPtr); ! static int ReturnRange (Ns_Conn *conn, Range *rangesPtr, Tcl_Channel chan, ! CONST char *data, int len, CONST char *type); /* *************** *** 276,280 **** Ns_DStringInit(&ds); if (Ns_UrlToFile(&ds, server, url) == NS_OK ! && (!stat(ds.string, &st) || !Tcl_Stat(ds.string, &st)) && ((dir && S_ISDIR(st.st_mode)) || (dir == NS_FALSE && S_ISREG(st.st_mode)))) { --- 275,279 ---- Ns_DStringInit(&ds); if (Ns_UrlToFile(&ds, server, url) == NS_OK ! && Tcl_Stat(ds.string, &st) == 0 && ((dir && S_ISDIR(st.st_mode)) || (dir == NS_FALSE && S_ISREG(st.st_mode)))) { *************** *** 366,371 **** } Ns_DStringVarAppend(&ds, "/", servPtr->fastpath.dirv[i], NULL); ! if ((!stat(ds.string, &st) || !Tcl_Stat(ds.string, &st)) ! && S_ISREG(st.st_mode)) { if (url[strlen(url) - 1] != '/') { Ns_DStringTrunc(&ds, 0); --- 365,369 ---- } Ns_DStringVarAppend(&ds, "/", servPtr->fastpath.dirv[i], NULL); ! if (Tcl_Stat(ds.string, &st) == 0 && S_ISREG(st.st_mode)) { if (url[strlen(url) - 1] != '/') { Ns_DStringTrunc(&ds, 0); *************** *** 470,474 **** FastStat(CONST char *file, struct stat *stPtr) { ! if (stat(file, stPtr) != 0 && Tcl_Stat(file, stPtr) != 0) { if (Tcl_GetErrno() != ENOENT && Tcl_GetErrno() != EACCES) { Ns_Log(Error, "fastpath: stat(%s) failed: %s", --- 468,472 ---- FastStat(CONST char *file, struct stat *stPtr) { ! if (Tcl_Stat(file, stPtr) != 0) { if (Tcl_GetErrno() != ENOENT && Tcl_GetErrno() != EACCES) { Ns_Log(Error, "fastpath: stat(%s) failed: %s", *************** *** 502,506 **** CONST char *file, struct stat *stPtr) { ! int fd = -1, new, nread, result = NS_ERROR; Range range; char *key; --- 500,504 ---- CONST char *file, struct stat *stPtr) { ! int new, nread, result = NS_ERROR; Range range; char *key; *************** *** 576,598 **** if (servPtr->fastpath.mmap && NsMemMap(file, stPtr->st_size, NS_MMAP_READ, &fmap) == NS_OK) { ! result = ReturnRange(conn,&range,-1,NULL,fmap.addr,fmap.size,type); NsMemUmap(&fmap); } else { ! fd = open(file, O_RDONLY|O_BINARY); ! if (fd == -1) { ! chan = Tcl_OpenFileChannel(NULL, file, "r", 0644); ! if (chan == NULL) { ! Ns_Log(Warning, "fastpath: failed to open '%s': '%s'", ! file, strerror(Tcl_GetErrno())); ! goto notfound; ! } ! Tcl_SetChannelOption(NULL, chan, "-translation", "binary"); ! } ! result = ReturnRange(conn,&range,fd,chan,0,stPtr->st_size,type); ! if (fd >= 0) { ! close(fd); ! } else { ! Tcl_Close(NULL, chan); } } --- 574,589 ---- if (servPtr->fastpath.mmap && NsMemMap(file, stPtr->st_size, NS_MMAP_READ, &fmap) == NS_OK) { ! result = ReturnRange(conn,&range, NULL, fmap.addr,fmap.size, type); NsMemUmap(&fmap); } else { ! chan = Tcl_OpenFileChannel(NULL, file, "r", 0644); ! if (chan == NULL) { ! Ns_Log(Warning, "fastpath: failed to open '%s': '%s'", ! file, strerror(Tcl_GetErrno())); ! goto notfound; } + Tcl_SetChannelOption(NULL, chan, "-translation", "binary"); + result = ReturnRange(conn, &range, chan, 0, stPtr->st_size, type); + Tcl_Close(NULL, chan); } *************** *** 635,664 **** Ns_CacheUnlock(servPtr->fastpath.cache); ! fd = open(file, O_RDONLY|O_BINARY); ! if (fd == -1) { ! chan = Tcl_OpenFileChannel(NULL, file, "r", 0644); ! if (chan == NULL) { ! filePtr = NULL; ! Ns_Log(Warning, "fastpath: failed to open '%s': '%s'", ! file, strerror(Tcl_GetErrno())); ! } else { ! Tcl_SetChannelOption(NULL, chan, "-translation", "binary"); ! } } ! if (fd >= 0 || chan) { filePtr = ns_malloc(sizeof(File) + stPtr->st_size); filePtr->refcnt = 1; filePtr->size = stPtr->st_size; filePtr->mtime = stPtr->st_mtime; ! if (fd >= 0) { ! nread = read(fd, filePtr->bytes, (size_t)filePtr->size); ! close(fd); ! } else { ! nread = Tcl_Read(chan, filePtr->bytes, filePtr->size); ! Tcl_Close(NULL, chan); ! } if (nread != filePtr->size) { Ns_Log(Warning, "fastpath: failed to read '%s': '%s'", ! file, strerror((fd>=0)?errno:Tcl_GetErrno())); ns_free(filePtr); filePtr = NULL; --- 626,647 ---- Ns_CacheUnlock(servPtr->fastpath.cache); ! chan = Tcl_OpenFileChannel(NULL, file, "r", 0644); ! if (chan == NULL) { ! filePtr = NULL; ! Ns_Log(Warning, "fastpath: failed to open '%s': '%s'", ! file, strerror(Tcl_GetErrno())); ! } else { ! Tcl_SetChannelOption(NULL, chan, "-translation", "binary"); } ! if (chan) { filePtr = ns_malloc(sizeof(File) + stPtr->st_size); filePtr->refcnt = 1; filePtr->size = stPtr->st_size; filePtr->mtime = stPtr->st_mtime; ! nread = Tcl_Read(chan, filePtr->bytes, filePtr->size); ! Tcl_Close(NULL, chan); if (nread != filePtr->size) { Ns_Log(Warning, "fastpath: failed to read '%s': '%s'", ! file, strerror(Tcl_GetErrno())); ns_free(filePtr); filePtr = NULL; *************** *** 677,681 **** ++filePtr->refcnt; Ns_CacheUnlock(servPtr->fastpath.cache); ! result = ReturnRange(conn, &range, -1, NULL, filePtr->bytes, filePtr->size, type); Ns_CacheLock(servPtr->fastpath.cache); --- 660,664 ---- ++filePtr->refcnt; Ns_CacheUnlock(servPtr->fastpath.cache); ! result = ReturnRange(conn, &range, NULL, filePtr->bytes, filePtr->size, type); Ns_CacheLock(servPtr->fastpath.cache); *************** *** 947,951 **** static int ! ReturnRange(Ns_Conn *conn, Range *rangesPtr, int fd, Tcl_Channel chan, CONST char *data, int len, CONST char *type) { --- 930,934 ---- static int ! ReturnRange(Ns_Conn *conn, Range *rangesPtr, Tcl_Channel chan, CONST char *data, int len, CONST char *type) { *************** *** 966,972 **** status = rangesPtr->status; ! if (fd >= 0) { ! return Ns_ConnReturnOpenFd(conn, status, type, fd, len); ! } else if (chan) { return Ns_ConnReturnOpenChannel(conn, status, type, chan, len); } else { --- 949,953 ---- status = rangesPtr->status; ! if (chan) { return Ns_ConnReturnOpenChannel(conn, status, type, chan, len); } else { *************** *** 988,995 **** Ns_ConnQueueHeaders(conn, rangesPtr->status); ! if (fd >= 0) { ! lseek(fd, roPtr->start, SEEK_SET); ! result = Ns_ConnSendFd(conn, fd, roPtr->size); ! } else if (chan) { Tcl_Seek(chan, roPtr->start, SEEK_SET); result = Ns_ConnSendChannel(conn, chan, roPtr->size); --- 969,973 ---- Ns_ConnQueueHeaders(conn, rangesPtr->status); ! if (chan) { Tcl_Seek(chan, roPtr->start, SEEK_SET); result = Ns_ConnSendChannel(conn, chan, roPtr->size); *************** *** 1045,1049 **** /* * Second io vector will contain actual range buffer offset ! * and size. It will be ignored in fd mode. */ --- 1023,1027 ---- /* * Second io vector will contain actual range buffer offset ! * and size. It will be ignored in chan mode. */ *************** *** 1080,1084 **** Ns_ConnQueueHeaders(conn, rangesPtr->status); ! if (fd == -1 && chan == NULL) { /* --- 1058,1062 ---- Ns_ConnQueueHeaders(conn, rangesPtr->status); ! if (chan == NULL) { /* *************** *** 1091,1095 **** /* ! * In fd/chan mode, send headers and contents in separate calls */ --- 1069,1073 ---- /* ! * In chan mode, send headers and contents in separate calls */ *************** *** 1108,1121 **** /* ! * Send file content directly from open fd/chan */ ! if (fd >= 0) { ! lseek(fd, roPtr->start, SEEK_SET); ! result = Ns_ConnSendFd(conn, fd, roPtr->size); ! } else { ! Tcl_Seek(chan, roPtr->start, SEEK_SET); ! result = Ns_ConnSendChannel(conn, chan, roPtr->size); ! } if (result == NS_ERROR) { break; --- 1086,1094 ---- /* ! * Send file content directly from open chan */ ! Tcl_Seek(chan, roPtr->start, SEEK_SET); ! result = Ns_ConnSendChannel(conn, chan, roPtr->size); if (result == NS_ERROR) { break; *************** *** 1124,1128 **** /* * Point iovPtr to the third (boundary) iov buffer. ! * The second iov buffer is not used in fd/chan mode. */ --- 1097,1101 ---- /* * Point iovPtr to the third (boundary) iov buffer. ! * The second iov buffer is not used in chan mode. */ Index: adpeval.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/adpeval.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** adpeval.c 8 Oct 2005 12:06:07 -0000 1.6 --- adpeval.c 10 Oct 2005 09:32:03 -0000 1.7 *************** *** 353,357 **** */ ! if (stat(file, &st) != 0 && Tcl_Stat(file, &st) != 0) { Tcl_AppendResult(interp, "could not stat \"", file, "\": ", Tcl_PosixError(interp), NULL); --- 353,357 ---- */ ! if (Tcl_Stat(file, &st) != 0) { Tcl_AppendResult(interp, "could not stat \"", file, "\": ", Tcl_PosixError(interp), NULL); *************** *** 695,699 **** Tcl_DString utf; char *page, *buf; ! int fd = -1, n, trys, status; size_t size; Page *pagePtr; --- 695,699 ---- Tcl_DString utf; char *page, *buf; ! int n, trys, status; size_t size; Page *pagePtr; *************** *** 701,712 **** Tcl_Channel chan = NULL; ! fd = open(file, O_RDONLY | O_BINARY); ! if (fd == -1) { ! chan = Tcl_OpenFileChannel(interp, file, "r", 0644); ! if (chan == NULL) { ! Tcl_AppendResult(interp, "could not open \"", file, "\": ", ! Tcl_PosixError(interp), NULL); ! return NULL; ! } } --- 701,709 ---- Tcl_Channel chan = NULL; ! chan = Tcl_OpenFileChannel(interp, file, "r", 0644); ! if (chan == NULL) { ! Tcl_AppendResult(interp, "could not open \"", file, "\": ", ! Tcl_PosixError(interp), NULL); ! return NULL; } *************** *** 722,730 **** */ ! if (fd >= 0) { ! status = fstat(fd, stPtr); ! } else { ! status = Tcl_Stat(file, stPtr); ! } if (status != 0) { Tcl_AppendResult(interp, "could not stat \"", file, "\": ", --- 719,723 ---- */ ! status = Tcl_Stat(file, stPtr); if (status != 0) { Tcl_AppendResult(interp, "could not stat \"", file, "\": ", *************** *** 740,748 **** */ ! if (fd >= 0) { ! n = read(fd, buf, size + 1); ! } else { ! n = Tcl_Read(chan, buf, size + 1); ! } if (n < 0) { Tcl_AppendResult(interp, "could not read \"", file, "\": ", --- 733,737 ---- */ ! n = Tcl_Read(chan, buf, size + 1); if (n < 0) { Tcl_AppendResult(interp, "could not read \"", file, "\": ", *************** *** 756,764 **** */ ! if (fd >= 0) { ! status = lseek(fd, 0, SEEK_SET); ! } else { ! status = Tcl_Seek(chan, 0, SEEK_SET); ! } if (status != 0) { Tcl_AppendResult(interp, "could not seek \"", file, "\": ", --- 745,749 ---- */ ! status = Tcl_Seek(chan, 0, SEEK_SET); if (status != 0) { Tcl_AppendResult(interp, "could not seek \"", file, "\": ", *************** *** 804,813 **** done: ns_free(buf); ! ! if (fd >= 0) { ! close(fd); ! } else { ! Tcl_Close(interp, chan); ! } return pagePtr; --- 789,793 ---- done: ns_free(buf); ! Tcl_Close(interp, chan); return pagePtr; Index: urlopen.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/urlopen.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** urlopen.c 8 Oct 2005 12:06:07 -0000 1.4 --- urlopen.c 10 Oct 2005 09:32:04 -0000 1.5 *************** *** 79,98 **** Ns_DString ds; Tcl_Channel chan = NULL; ! int nread, fd = -1; char buf[1024]; Ns_DStringInit(&ds); Ns_UrlToFile(&ds, server, url); ! fd = open(ds.string, O_RDONLY|O_BINARY); ! if (fd == -1) { ! chan = Tcl_OpenFileChannel(NULL, ds.string, "r", 0); ! } Ns_DStringFree(&ds); ! if (fd >= 0) { ! while ((nread = read(fd, buf, sizeof(buf))) > 0) { ! Ns_DStringNAppend(dsPtr, buf, nread); ! } ! close(fd); ! } else if (chan) { while ((nread = Tcl_Read(chan, buf, sizeof(buf))) > 0) { Ns_DStringNAppend(dsPtr, buf, nread); --- 79,90 ---- Ns_DString ds; Tcl_Channel chan = NULL; ! int nread; char buf[1024]; Ns_DStringInit(&ds); Ns_UrlToFile(&ds, server, url); ! chan = Tcl_OpenFileChannel(NULL, ds.string, "r", 0); Ns_DStringFree(&ds); ! if (chan) { while ((nread = Tcl_Read(chan, buf, sizeof(buf))) > 0) { Ns_DStringNAppend(dsPtr, buf, nread); Index: adprequest.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/adprequest.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** adprequest.c 8 Oct 2005 12:06:07 -0000 1.8 --- adprequest.c 10 Oct 2005 09:32:04 -0000 1.9 *************** *** 104,109 **** * Verify the file exists. */ ! ! if (access(file, R_OK) != 0 && Tcl_Access(file, R_OK) != 0) { return Ns_ConnReturnNotFound(conn); } --- 104,109 ---- * Verify the file exists. */ ! ! if (Tcl_Access(file, R_OK) != 0) { return Ns_ConnReturnNotFound(conn); } |
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18251 Modified Files: .cvsignore ChangeLog Makefile configure.in Added Files: acinclude.m4 autogen.sh missing Removed Files: aclocal.m4 configure tcl.m4 Log Message: * Makefile: * autogen.sh: New script to run the various autotools to generate the build system. * missing: Add this default automake helper script. * configure.in: Initialise automake, even though we don't use it, so that we can use aclocal to manage our m4 scripts. * aclocal.m4: * acinclude.m4: Contents of aclocal.m4 now moved to acinclude.m4. aclocal.m4 is now autogenerated by the aclocal tool, called from within autogen. * configure: * include/nsconfig.h.in: Remove autogenerated scripts from cvs. New strategy is to call autogen.sh on first checkout to intialise the build environment. * tcl.m4: * m4/tcl.m4: Move into m4 subdirectory. Upgrade to revision 1.74 from Tcl cvs. Fully quote macro names (needs to go upstream). * .cvsignore: * include/.cvsignore: Ignore some new autogenerated build scripts, and some old ones we no longer keep in cvs. Index: .cvsignore =================================================================== RCS file: /cvsroot/naviserver/naviserver/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 1 Oct 2005 19:50:43 -0000 1.1 --- .cvsignore 9 Oct 2005 23:43:56 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + aclocal.m4 + autom4te.cache config.cache config.log --- configure DELETED --- Index: configure.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/configure.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** configure.in 8 Oct 2005 09:27:03 -0000 1.10 --- configure.in 9 Oct 2005 23:43:57 -0000 1.11 *************** *** 42,45 **** --- 42,46 ---- AC_PREREQ(2.50) AC_REVISION($Revision$) + AM_INIT_AUTOMAKE *************** *** 65,69 **** # ! TEA_INIT([3.2]) TEA_PATH_TCLCONFIG TEA_LOAD_TCLCONFIG --- 66,70 ---- # ! TEA_INIT([3.3]) TEA_PATH_TCLCONFIG TEA_LOAD_TCLCONFIG *************** *** 233,236 **** --- 234,238 ---- fi + # # Create Makefiles. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.206 retrieving revision 1.207 diff -C2 -d -r1.206 -r1.207 *** ChangeLog 9 Oct 2005 22:27:23 -0000 1.206 --- ChangeLog 9 Oct 2005 23:43:56 -0000 1.207 *************** *** 1,4 **** --- 1,25 ---- 2005-10-09 Stephen Deasey <sd...@us...> + * Makefile: + * autogen.sh: New script to run the various autotools to generate + the build system. + * missing: Add this default automake helper script. + * configure.in: Initialise automake, even though we don't use it, + so that we can use aclocal to manage our m4 scripts. + * aclocal.m4: + * acinclude.m4: Contents of aclocal.m4 now moved to acinclude.m4. + aclocal.m4 is now autogenerated by the aclocal tool, called from + within autogen. + * configure: + * include/nsconfig.h.in: Remove autogenerated scripts from cvs. + New strategy is to call autogen.sh on first checkout to intialise + the build environment. + * tcl.m4: + * m4/tcl.m4: Move into m4 subdirectory. Upgrade to revision 1.74 + from Tcl cvs. Fully quote macro names (needs to go upstream). + * .cvsignore: + * include/.cvsignore: Ignore some new autogenerated build scripts, + and some old ones we no longer keep in cvs. + * nsd/nsd.h: * nsd/modload.c: --- NEW FILE: missing --- #! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-02-08.22 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pi...@ir...>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to <bug...@gn...>." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: Index: Makefile =================================================================== RCS file: /cvsroot/naviserver/naviserver/Makefile,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile 20 Jul 2005 05:31:20 -0000 1.13 --- Makefile 9 Oct 2005 23:43:57 -0000 1.14 *************** *** 37,41 **** distfiles = $(dirs) doc tcl include tests win32 *.tcl *.m4 configure \ ! Makefile install-sh README ChangeLog NEWS license.terms naviserver.rdf all: --- 37,41 ---- distfiles = $(dirs) doc tcl include tests win32 *.tcl *.m4 configure \ ! Makefile install-sh missing README ChangeLog NEWS license.terms naviserver.rdf all: *************** *** 95,100 **** distclean: clean ! $(RM) config.status config.log config.cache \ ! include/Makefile.global include/Makefile.module include/config.h \ naviserver-$(NS_PATCH_LEVEL).tar.gz --- 95,100 ---- distclean: clean ! $(RM) config.status config.log config.cache autom4te.cache aclocal.m4 configure \ ! include/{Makefile.global,Makefile.module,nsconfig.h,nsconfig.h.in,stamp-h1} \ naviserver-$(NS_PATCH_LEVEL).tar.gz *************** *** 103,107 **** $(MKDIR) naviserver-$(NS_PATCH_LEVEL) $(CP) $(distfiles) naviserver-$(NS_PATCH_LEVEL) ! $(RM) naviserver-$(NS_PATCH_LEVEL)/include/{config.h,Makefile.global,Makefile.module} tar czf naviserver-$(NS_PATCH_LEVEL).tar.gz naviserver-$(NS_PATCH_LEVEL) $(RM) naviserver-$(NS_PATCH_LEVEL) --- 103,107 ---- $(MKDIR) naviserver-$(NS_PATCH_LEVEL) $(CP) $(distfiles) naviserver-$(NS_PATCH_LEVEL) ! $(RM) naviserver-$(NS_PATCH_LEVEL)/include/{nsconfig.h,Makefile.global,Makefile.module,stamp-h1} tar czf naviserver-$(NS_PATCH_LEVEL).tar.gz naviserver-$(NS_PATCH_LEVEL) $(RM) naviserver-$(NS_PATCH_LEVEL) --- NEW FILE: acinclude.m4 --- # # The contents of this file are subject to the AOLserver Public License # Version 1.1 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://aolserver.com/. # # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See # the License for the specific language governing rights and limitations # under the License. # # The Original Code is AOLserver Code and related documentation # distributed by AOL. # # The Initial Developer of the Original Code is America Online, # Inc. Portions created by AOL are Copyright (C) 1999 America Online, # Inc. All Rights Reserved. # # Alternatively, the contents of this file may be used under the terms # of the GNU General Public License (the "GPL"), in which case the # provisions of GPL are applicable instead of those above. If you wish # to allow use of your version of this file only under the terms of the # GPL and not to allow others to use your version of this file under the # License, indicate your decision by deleting the provisions above and # replace them with the notice and other provisions required by the GPL. # If you do not delete the provisions above, a recipient may use your # version of this file under either the License or the GPL. # # # $Header: /cvsroot/naviserver/naviserver/acinclude.m4,v 1.1 2005/10/09 23:43:57 sdeasey Exp $ # dnl dnl Check to see what variant of gethostbyname_r() we have. Defines dnl HAVE_GETHOSTBYNAME_R_{6, 5, 3} depending on what variant is found. dnl dnl Based on David Arnold's example from the comp.programming.threads dnl FAQ Q213. dnl AC_DEFUN([AC_HAVE_GETHOSTBYNAME_R], [saved_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -lnsl" AC_CHECK_FUNC(gethostbyname_r, [ AC_MSG_CHECKING([for gethostbyname_r with 6 args]) AC_TRY_COMPILE([ #include <netdb.h> ], [ char *name; struct hostent *he, *res; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop); ], [ AC_DEFINE(HAVE_GETHOSTBYNAME_R,1,[Define to 1 if gethostbyname_r is available.]) AC_DEFINE(HAVE_GETHOSTBYNAME_R_6,1,[Define to 1 if gethostbyname_r takes 6 args.]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) AC_MSG_CHECKING([for gethostbyname_r with 5 args]) AC_TRY_COMPILE([ #include <netdb.h> ], [ char *name; struct hostent *he; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop); ], [ AC_DEFINE(HAVE_GETHOSTBYNAME_R,1,[Define to 1 if gethostbyname_r is available.]) AC_DEFINE(HAVE_GETHOSTBYNAME_R_5,1,[Define to 1 if gethostbyname_r takes 5 args.]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) AC_MSG_CHECKING([for gethostbyname_r with 3 args]) AC_TRY_COMPILE([ #include <netdb.h> ], [ char *name; struct hostent *he; struct hostent_data data; (void) gethostbyname_r(name, he, &data); ], [ AC_DEFINE(HAVE_GETHOSTBYNAME_R,1,[Define to 1 if gethostbyname_r is available.]) AC_DEFINE(HAVE_GETHOSTBYNAME_R_3,1,[Define to 1 if gethostbyname_r takes 3 args.]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) ]) ]) ]) CFLAGS="$saved_CFLAGS"]) AC_DEFUN([AC_HAVE_GETHOSTBYADDR_R], [saved_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -lnsl" AC_CHECK_FUNC(gethostbyaddr_r, [ AC_MSG_CHECKING([for gethostbyaddr_r with 7 args]) AC_TRY_COMPILE([ #include <netdb.h> ], [ char *addr; int length; int type; struct hostent *result; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, &h_errnop); ], [ AC_DEFINE(HAVE_GETHOSTBYADDR_R,1,[Define to 1 if gethostbyaddr_r is available.]) AC_DEFINE(HAVE_GETHOSTBYADDR_R_7,1,[Define to 1 if gethostbyaddr_r takes 7 args.]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) ]) CFLAGS="$saved_CFLAGS"]) dnl @synopsis AC_CHECK_STRUCT_FOR(INCLUDES,STRUCT,MEMBER,DEFINE,[no]) dnl dnl Checks STRUCT for MEMBER and defines DEFINE if found. dnl dnl @version $Id: acinclude.m4,v 1.1 2005/10/09 23:43:57 sdeasey Exp $ dnl @author Wes Hardaker <wjh...@uc...> dnl AC_DEFUN([AC_CHECK_STRUCT_FOR],[ ac_safe_struct=`echo "$2" | sed 'y%./+-%__p_%'` ac_safe_member=`echo "$3" | sed 'y%./+-%__p_%'` ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}" changequote(, )dnl ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` changequote([, ])dnl AC_MSG_CHECKING([for $2.$3]) AC_CACHE_VAL($ac_safe_all, [ if test "x$4" = "x"; then defineit="= 0" elif test "x$4" = "xno"; then defineit="" else defineit="$4" fi AC_TRY_COMPILE([ $1 ],[ struct $2 testit; testit.$3 $defineit; ], eval "${ac_safe_all}=yes", eval "${ac_safe_all}=no" ) ]) if eval "test \"x$`echo ${ac_safe_all}`\" = \"xyes\""; then AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED($ac_uc_define) else AC_MSG_RESULT(no) fi ]) --- aclocal.m4 DELETED --- --- tcl.m4 DELETED --- --- NEW FILE: autogen.sh --- #!/bin/sh # Run this to generate all the initial makefiles, etc. srcdir=`dirname $0` test -z "$srcdir" && srcdir=. DIE=0 (test -f $srcdir/configure.in) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level package directory" exit 1 } (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`autoconf' installed." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" DIE=1 } (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`automake' installed." echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" DIE=1 NO_AUTOMAKE=yes } # if no automake, don't bother testing for aclocal test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: Missing \`aclocal'. The version of \`automake'" echo "installed doesn't appear recent enough." echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" DIE=1 } if test "$DIE" -eq 1; then exit 1 fi rm -rf autom4te.cache echo "Running aclocal -I m4 $ACLOCAL_FLAGS" aclocal -I m4 $ACLOCAL_FLAGS || exit $? echo "Running autoheader" autoheader || exit $? echo "Running autoconf" autoconf || exit $? if test -z "$*"; then echo "**Warning**: I am going to run \`configure' with no arguments." echo "If you wish to pass any to it, please specify them on the" echo \`$0\'" command line." echo fi conf_flags="--enable-maintainer-mode" if test x$NOCONFIGURE = x; then echo Running $srcdir/configure $conf_flags "$@" ... $srcdir/configure $conf_flags "$@" \ && echo Now type \`make\' to compile. || exit 1 else echo Skipping configure process. fi |