Fossil SCM

Make "fossil version -v" report the right openssl version, even when it was linked dynamically with openssl and the openssl version was later upgraded. Remove some dead code and comments which are not true any more.

jan.nijtmans 2014-06-06 07:10 trunk
Commit 48f1239eb2e9098b5c2f3b7d118683e4418f4696
2 files changed +2 -27 +5 -9
+2 -27
--- src/main.c
+++ src/main.c
@@ -32,11 +32,11 @@
3232
#else
3333
# include <errno.h> /* errno global */
3434
#endif
3535
#include "zlib.h"
3636
#ifdef FOSSIL_ENABLE_SSL
37
-# include "openssl/opensslv.h"
37
+# include "openssl/crypto.h"
3838
#endif
3939
#if INTERFACE
4040
#ifdef FOSSIL_ENABLE_TCL
4141
# include "tcl.h"
4242
#endif
@@ -167,35 +167,10 @@
167167
int wikiFlags; /* Wiki conversion flags applied to %w and %W */
168168
char isHTTP; /* True if server/CGI modes, else assume CLI. */
169169
char javascriptHyperlink; /* If true, set href= using script, not HTML */
170170
Blob httpHeader; /* Complete text of the HTTP request header */
171171
UrlData url; /* Information about current URL */
172
-#if 0
173
- /*
174
- ** NOTE: These members MUST be kept in sync with those in the "UrlData"
175
- ** structure defined in "url.c".
176
- */
177
- int urlIsFile; /* True if a "file:" url */
178
- int urlIsHttps; /* True if a "https:" url */
179
- int urlIsSsh; /* True if an "ssh:" url */
180
- char *urlName; /* Hostname for http: or filename for file: */
181
- char *urlHostname; /* The HOST: parameter on http headers */
182
- char *urlProtocol; /* "http" or "https" */
183
- int urlPort; /* TCP port number for http: or https: */
184
- int urlDfltPort; /* The default port for the given protocol */
185
- char *urlPath; /* Pathname for http: */
186
- char *urlUser; /* User id for http: */
187
- char *urlPasswd; /* Password for http: */
188
- char *urlCanonical; /* Canonical representation of the URL */
189
- char *urlProxyAuth; /* Proxy-Authorizer: string */
190
- char *urlFossil; /* The fossil query parameter on ssh: */
191
- unsigned urlFlags; /* Boolean flags controlling URL processing */
192
- int useProxy; /* Used to remember that a proxy is in use */
193
- char *proxyUrlPath;
194
- int proxyOrigPort; /* Tunneled port number for https through proxy */
195
-#endif
196
-
197172
const char *zLogin; /* Login name. NULL or "" if not logged in. */
198173
const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
199174
** SSL client identity */
200175
int useLocalauth; /* No login required if from 127.0.0.1 */
201176
int noPswd; /* Logged in without password (on 127.0.0.1) */
@@ -885,11 +860,11 @@
885860
__DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
886861
fossil_print("SQLite %s %.30s\n", sqlite3_libversion(), sqlite3_sourceid());
887862
fossil_print("Schema version %s\n", AUX_SCHEMA);
888863
fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
889864
#if defined(FOSSIL_ENABLE_SSL)
890
- fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
865
+ fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
891866
#endif
892867
#if defined(FOSSIL_ENABLE_TCL)
893868
Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL);
894869
rc = Th_Eval(g.interp, 0, "tclInvoke info patchlevel", -1);
895870
zRc = Th_ReturnCodeName(rc, 0);
896871
--- src/main.c
+++ src/main.c
@@ -32,11 +32,11 @@
32 #else
33 # include <errno.h> /* errno global */
34 #endif
35 #include "zlib.h"
36 #ifdef FOSSIL_ENABLE_SSL
37 # include "openssl/opensslv.h"
38 #endif
39 #if INTERFACE
40 #ifdef FOSSIL_ENABLE_TCL
41 # include "tcl.h"
42 #endif
@@ -167,35 +167,10 @@
167 int wikiFlags; /* Wiki conversion flags applied to %w and %W */
168 char isHTTP; /* True if server/CGI modes, else assume CLI. */
169 char javascriptHyperlink; /* If true, set href= using script, not HTML */
170 Blob httpHeader; /* Complete text of the HTTP request header */
171 UrlData url; /* Information about current URL */
172 #if 0
173 /*
174 ** NOTE: These members MUST be kept in sync with those in the "UrlData"
175 ** structure defined in "url.c".
176 */
177 int urlIsFile; /* True if a "file:" url */
178 int urlIsHttps; /* True if a "https:" url */
179 int urlIsSsh; /* True if an "ssh:" url */
180 char *urlName; /* Hostname for http: or filename for file: */
181 char *urlHostname; /* The HOST: parameter on http headers */
182 char *urlProtocol; /* "http" or "https" */
183 int urlPort; /* TCP port number for http: or https: */
184 int urlDfltPort; /* The default port for the given protocol */
185 char *urlPath; /* Pathname for http: */
186 char *urlUser; /* User id for http: */
187 char *urlPasswd; /* Password for http: */
188 char *urlCanonical; /* Canonical representation of the URL */
189 char *urlProxyAuth; /* Proxy-Authorizer: string */
190 char *urlFossil; /* The fossil query parameter on ssh: */
191 unsigned urlFlags; /* Boolean flags controlling URL processing */
192 int useProxy; /* Used to remember that a proxy is in use */
193 char *proxyUrlPath;
194 int proxyOrigPort; /* Tunneled port number for https through proxy */
195 #endif
196
197 const char *zLogin; /* Login name. NULL or "" if not logged in. */
198 const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
199 ** SSL client identity */
200 int useLocalauth; /* No login required if from 127.0.0.1 */
201 int noPswd; /* Logged in without password (on 127.0.0.1) */
@@ -885,11 +860,11 @@
885 __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
886 fossil_print("SQLite %s %.30s\n", sqlite3_libversion(), sqlite3_sourceid());
887 fossil_print("Schema version %s\n", AUX_SCHEMA);
888 fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
889 #if defined(FOSSIL_ENABLE_SSL)
890 fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
891 #endif
892 #if defined(FOSSIL_ENABLE_TCL)
893 Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL);
894 rc = Th_Eval(g.interp, 0, "tclInvoke info patchlevel", -1);
895 zRc = Th_ReturnCodeName(rc, 0);
896
--- src/main.c
+++ src/main.c
@@ -32,11 +32,11 @@
32 #else
33 # include <errno.h> /* errno global */
34 #endif
35 #include "zlib.h"
36 #ifdef FOSSIL_ENABLE_SSL
37 # include "openssl/crypto.h"
38 #endif
39 #if INTERFACE
40 #ifdef FOSSIL_ENABLE_TCL
41 # include "tcl.h"
42 #endif
@@ -167,35 +167,10 @@
167 int wikiFlags; /* Wiki conversion flags applied to %w and %W */
168 char isHTTP; /* True if server/CGI modes, else assume CLI. */
169 char javascriptHyperlink; /* If true, set href= using script, not HTML */
170 Blob httpHeader; /* Complete text of the HTTP request header */
171 UrlData url; /* Information about current URL */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172 const char *zLogin; /* Login name. NULL or "" if not logged in. */
173 const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
174 ** SSL client identity */
175 int useLocalauth; /* No login required if from 127.0.0.1 */
176 int noPswd; /* Logged in without password (on 127.0.0.1) */
@@ -885,11 +860,11 @@
860 __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
861 fossil_print("SQLite %s %.30s\n", sqlite3_libversion(), sqlite3_sourceid());
862 fossil_print("Schema version %s\n", AUX_SCHEMA);
863 fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
864 #if defined(FOSSIL_ENABLE_SSL)
865 fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
866 #endif
867 #if defined(FOSSIL_ENABLE_TCL)
868 Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL);
869 rc = Th_Eval(g.interp, 0, "tclInvoke info patchlevel", -1);
870 zRc = Th_ReturnCodeName(rc, 0);
871
+5 -9
--- src/url.c
+++ src/url.c
@@ -43,14 +43,10 @@
4343
4444
/*
4545
** The URL related data used with this subsystem.
4646
*/
4747
struct UrlData {
48
- /*
49
- ** NOTE: These members MUST be kept in sync with the related ones in the
50
- ** "Global" structure defined in "main.c".
51
- */
5248
int isFile; /* True if a "file:" url */
5349
int isHttps; /* True if a "https:" url */
5450
int isSsh; /* True if an "ssh:" url */
5551
char *name; /* Hostname for http: or filename for file: */
5652
char *hostname; /* The HOST: parameter on http headers */
@@ -213,11 +209,11 @@
213209
}
214210
215211
dehttpize(pUrlData->path);
216212
if( pUrlData->dfltPort==pUrlData->port ){
217213
pUrlData->canonical = mprintf(
218
- "%s://%s%T%T%s",
214
+ "%s://%s%T%T%s",
219215
pUrlData->protocol, zLogin, pUrlData->name, pUrlData->path, zExe
220216
);
221217
}else{
222218
pUrlData->canonical = mprintf(
223219
"%s://%s%T:%d%T%s",
@@ -250,11 +246,11 @@
250246
fossil_fatal("unknown repository: %s", zUrl);
251247
}
252248
if( urlFlags ) pUrlData->flags = urlFlags;
253249
if( pUrlData->isFile ){
254250
Blob cfile;
255
- dehttpize(zFile);
251
+ dehttpize(zFile);
256252
file_canonical_name(zFile, &cfile, 0);
257253
free(zFile);
258254
pUrlData->protocol = "file";
259255
pUrlData->path = "";
260256
pUrlData->name = mprintf("%b", &cfile);
@@ -272,15 +268,15 @@
272268
}
273269
}
274270
}
275271
276272
/*
277
-** Parse the given URL, which describes a sync server. Populate variables
273
+** Parse the given URL, which describes a sync server. Populate variables
278274
** in the global "g" structure as follows:
279275
**
280276
** g.url.isFile True if FILE:
281
-** g.url.isHttps True if HTTPS:
277
+** g.url.isHttps True if HTTPS:
282278
** g.url.isSsh True if SSH:
283279
** g.url.protocol "http" or "https" or "file"
284280
** g.url.name Hostname for HTTP:, HTTPS:, SSH:. Filename for FILE:
285281
** g.url.port TCP port number for HTTP or HTTPS.
286282
** g.url.dfltPort Default TCP port number (80 or 443).
@@ -470,11 +466,11 @@
470466
const char *zName2, /* Second override */
471467
const char *zValue2 /* Second override value */
472468
){
473469
const char *zSep = "?";
474470
int i;
475
-
471
+
476472
blob_reset(&p->url);
477473
blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase);
478474
for(i=0; i<p->nParam; i++){
479475
const char *z = p->azValue[i];
480476
if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){
481477
--- src/url.c
+++ src/url.c
@@ -43,14 +43,10 @@
43
44 /*
45 ** The URL related data used with this subsystem.
46 */
47 struct UrlData {
48 /*
49 ** NOTE: These members MUST be kept in sync with the related ones in the
50 ** "Global" structure defined in "main.c".
51 */
52 int isFile; /* True if a "file:" url */
53 int isHttps; /* True if a "https:" url */
54 int isSsh; /* True if an "ssh:" url */
55 char *name; /* Hostname for http: or filename for file: */
56 char *hostname; /* The HOST: parameter on http headers */
@@ -213,11 +209,11 @@
213 }
214
215 dehttpize(pUrlData->path);
216 if( pUrlData->dfltPort==pUrlData->port ){
217 pUrlData->canonical = mprintf(
218 "%s://%s%T%T%s",
219 pUrlData->protocol, zLogin, pUrlData->name, pUrlData->path, zExe
220 );
221 }else{
222 pUrlData->canonical = mprintf(
223 "%s://%s%T:%d%T%s",
@@ -250,11 +246,11 @@
250 fossil_fatal("unknown repository: %s", zUrl);
251 }
252 if( urlFlags ) pUrlData->flags = urlFlags;
253 if( pUrlData->isFile ){
254 Blob cfile;
255 dehttpize(zFile);
256 file_canonical_name(zFile, &cfile, 0);
257 free(zFile);
258 pUrlData->protocol = "file";
259 pUrlData->path = "";
260 pUrlData->name = mprintf("%b", &cfile);
@@ -272,15 +268,15 @@
272 }
273 }
274 }
275
276 /*
277 ** Parse the given URL, which describes a sync server. Populate variables
278 ** in the global "g" structure as follows:
279 **
280 ** g.url.isFile True if FILE:
281 ** g.url.isHttps True if HTTPS:
282 ** g.url.isSsh True if SSH:
283 ** g.url.protocol "http" or "https" or "file"
284 ** g.url.name Hostname for HTTP:, HTTPS:, SSH:. Filename for FILE:
285 ** g.url.port TCP port number for HTTP or HTTPS.
286 ** g.url.dfltPort Default TCP port number (80 or 443).
@@ -470,11 +466,11 @@
470 const char *zName2, /* Second override */
471 const char *zValue2 /* Second override value */
472 ){
473 const char *zSep = "?";
474 int i;
475
476 blob_reset(&p->url);
477 blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase);
478 for(i=0; i<p->nParam; i++){
479 const char *z = p->azValue[i];
480 if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){
481
--- src/url.c
+++ src/url.c
@@ -43,14 +43,10 @@
43
44 /*
45 ** The URL related data used with this subsystem.
46 */
47 struct UrlData {
 
 
 
 
48 int isFile; /* True if a "file:" url */
49 int isHttps; /* True if a "https:" url */
50 int isSsh; /* True if an "ssh:" url */
51 char *name; /* Hostname for http: or filename for file: */
52 char *hostname; /* The HOST: parameter on http headers */
@@ -213,11 +209,11 @@
209 }
210
211 dehttpize(pUrlData->path);
212 if( pUrlData->dfltPort==pUrlData->port ){
213 pUrlData->canonical = mprintf(
214 "%s://%s%T%T%s",
215 pUrlData->protocol, zLogin, pUrlData->name, pUrlData->path, zExe
216 );
217 }else{
218 pUrlData->canonical = mprintf(
219 "%s://%s%T:%d%T%s",
@@ -250,11 +246,11 @@
246 fossil_fatal("unknown repository: %s", zUrl);
247 }
248 if( urlFlags ) pUrlData->flags = urlFlags;
249 if( pUrlData->isFile ){
250 Blob cfile;
251 dehttpize(zFile);
252 file_canonical_name(zFile, &cfile, 0);
253 free(zFile);
254 pUrlData->protocol = "file";
255 pUrlData->path = "";
256 pUrlData->name = mprintf("%b", &cfile);
@@ -272,15 +268,15 @@
268 }
269 }
270 }
271
272 /*
273 ** Parse the given URL, which describes a sync server. Populate variables
274 ** in the global "g" structure as follows:
275 **
276 ** g.url.isFile True if FILE:
277 ** g.url.isHttps True if HTTPS:
278 ** g.url.isSsh True if SSH:
279 ** g.url.protocol "http" or "https" or "file"
280 ** g.url.name Hostname for HTTP:, HTTPS:, SSH:. Filename for FILE:
281 ** g.url.port TCP port number for HTTP or HTTPS.
282 ** g.url.dfltPort Default TCP port number (80 or 443).
@@ -470,11 +466,11 @@
466 const char *zName2, /* Second override */
467 const char *zValue2 /* Second override value */
468 ){
469 const char *zSep = "?";
470 int i;
471
472 blob_reset(&p->url);
473 blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase);
474 for(i=0; i<p->nParam; i++){
475 const char *z = p->azValue[i];
476 if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){
477

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button