Fossil SCM
Revise workaround for OpenSSL symbol name collision problem.
Commit
ff19cc215f4758ef22c030b9ff1da711b8e4f229
Parent
674bc278919d270…
6 files changed
+4
-4
+1
+1
-3
+2
-2
+1
+1
+4
-4
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -164,11 +164,11 @@ | ||
| 164 | 164 | Stmt ins; |
| 165 | 165 | Stmt q; |
| 166 | 166 | bag_init(&seen); |
| 167 | 167 | pqueue_init(&queue); |
| 168 | 168 | bag_insert(&seen, rid); |
| 169 | - pqueue_insert2(&queue, rid, 0.0, 0); | |
| 169 | + pqueue_insert(&queue, rid, 0.0, 0); | |
| 170 | 170 | db_prepare(&ins, "INSERT OR IGNORE INTO ok VALUES(:rid)"); |
| 171 | 171 | db_prepare(&q, |
| 172 | 172 | "SELECT a.pid, b.mtime FROM plink a LEFT JOIN plink b ON b.cid=a.pid" |
| 173 | 173 | " WHERE a.cid=:rid" |
| 174 | 174 | ); |
| @@ -179,11 +179,11 @@ | ||
| 179 | 179 | db_bind_int(&q, ":rid", rid); |
| 180 | 180 | while( db_step(&q)==SQLITE_ROW ){ |
| 181 | 181 | int pid = db_column_int(&q, 0); |
| 182 | 182 | double mtime = db_column_double(&q, 1); |
| 183 | 183 | if( bag_insert(&seen, pid) ){ |
| 184 | - pqueue_insert2(&queue, pid, -mtime, 0); | |
| 184 | + pqueue_insert(&queue, pid, -mtime, 0); | |
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | db_reset(&q); |
| 188 | 188 | } |
| 189 | 189 | bag_clear(&seen); |
| @@ -239,11 +239,11 @@ | ||
| 239 | 239 | Stmt q; |
| 240 | 240 | |
| 241 | 241 | bag_init(&seen); |
| 242 | 242 | pqueue_init(&queue); |
| 243 | 243 | bag_insert(&seen, rid); |
| 244 | - pqueue_insert2(&queue, rid, 0.0, 0); | |
| 244 | + pqueue_insert(&queue, rid, 0.0, 0); | |
| 245 | 245 | db_prepare(&ins, "INSERT OR IGNORE INTO ok VALUES(:rid)"); |
| 246 | 246 | db_prepare(&q, "SELECT cid, mtime FROM plink WHERE pid=:rid"); |
| 247 | 247 | while( (N--)>0 && (rid = pqueue_extract(&queue, 0))!=0 ){ |
| 248 | 248 | db_bind_int(&ins, ":rid", rid); |
| 249 | 249 | db_step(&ins); |
| @@ -251,11 +251,11 @@ | ||
| 251 | 251 | db_bind_int(&q, ":rid", rid); |
| 252 | 252 | while( db_step(&q)==SQLITE_ROW ){ |
| 253 | 253 | int pid = db_column_int(&q, 0); |
| 254 | 254 | double mtime = db_column_double(&q, 1); |
| 255 | 255 | if( bag_insert(&seen, pid) ){ |
| 256 | - pqueue_insert2(&queue, pid, mtime, 0); | |
| 256 | + pqueue_insert(&queue, pid, mtime, 0); | |
| 257 | 257 | } |
| 258 | 258 | } |
| 259 | 259 | db_reset(&q); |
| 260 | 260 | } |
| 261 | 261 | bag_clear(&seen); |
| 262 | 262 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -164,11 +164,11 @@ | |
| 164 | Stmt ins; |
| 165 | Stmt q; |
| 166 | bag_init(&seen); |
| 167 | pqueue_init(&queue); |
| 168 | bag_insert(&seen, rid); |
| 169 | pqueue_insert2(&queue, rid, 0.0, 0); |
| 170 | db_prepare(&ins, "INSERT OR IGNORE INTO ok VALUES(:rid)"); |
| 171 | db_prepare(&q, |
| 172 | "SELECT a.pid, b.mtime FROM plink a LEFT JOIN plink b ON b.cid=a.pid" |
| 173 | " WHERE a.cid=:rid" |
| 174 | ); |
| @@ -179,11 +179,11 @@ | |
| 179 | db_bind_int(&q, ":rid", rid); |
| 180 | while( db_step(&q)==SQLITE_ROW ){ |
| 181 | int pid = db_column_int(&q, 0); |
| 182 | double mtime = db_column_double(&q, 1); |
| 183 | if( bag_insert(&seen, pid) ){ |
| 184 | pqueue_insert2(&queue, pid, -mtime, 0); |
| 185 | } |
| 186 | } |
| 187 | db_reset(&q); |
| 188 | } |
| 189 | bag_clear(&seen); |
| @@ -239,11 +239,11 @@ | |
| 239 | Stmt q; |
| 240 | |
| 241 | bag_init(&seen); |
| 242 | pqueue_init(&queue); |
| 243 | bag_insert(&seen, rid); |
| 244 | pqueue_insert2(&queue, rid, 0.0, 0); |
| 245 | db_prepare(&ins, "INSERT OR IGNORE INTO ok VALUES(:rid)"); |
| 246 | db_prepare(&q, "SELECT cid, mtime FROM plink WHERE pid=:rid"); |
| 247 | while( (N--)>0 && (rid = pqueue_extract(&queue, 0))!=0 ){ |
| 248 | db_bind_int(&ins, ":rid", rid); |
| 249 | db_step(&ins); |
| @@ -251,11 +251,11 @@ | |
| 251 | db_bind_int(&q, ":rid", rid); |
| 252 | while( db_step(&q)==SQLITE_ROW ){ |
| 253 | int pid = db_column_int(&q, 0); |
| 254 | double mtime = db_column_double(&q, 1); |
| 255 | if( bag_insert(&seen, pid) ){ |
| 256 | pqueue_insert2(&queue, pid, mtime, 0); |
| 257 | } |
| 258 | } |
| 259 | db_reset(&q); |
| 260 | } |
| 261 | bag_clear(&seen); |
| 262 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -164,11 +164,11 @@ | |
| 164 | Stmt ins; |
| 165 | Stmt q; |
| 166 | bag_init(&seen); |
| 167 | pqueue_init(&queue); |
| 168 | bag_insert(&seen, rid); |
| 169 | pqueue_insert(&queue, rid, 0.0, 0); |
| 170 | db_prepare(&ins, "INSERT OR IGNORE INTO ok VALUES(:rid)"); |
| 171 | db_prepare(&q, |
| 172 | "SELECT a.pid, b.mtime FROM plink a LEFT JOIN plink b ON b.cid=a.pid" |
| 173 | " WHERE a.cid=:rid" |
| 174 | ); |
| @@ -179,11 +179,11 @@ | |
| 179 | db_bind_int(&q, ":rid", rid); |
| 180 | while( db_step(&q)==SQLITE_ROW ){ |
| 181 | int pid = db_column_int(&q, 0); |
| 182 | double mtime = db_column_double(&q, 1); |
| 183 | if( bag_insert(&seen, pid) ){ |
| 184 | pqueue_insert(&queue, pid, -mtime, 0); |
| 185 | } |
| 186 | } |
| 187 | db_reset(&q); |
| 188 | } |
| 189 | bag_clear(&seen); |
| @@ -239,11 +239,11 @@ | |
| 239 | Stmt q; |
| 240 | |
| 241 | bag_init(&seen); |
| 242 | pqueue_init(&queue); |
| 243 | bag_insert(&seen, rid); |
| 244 | pqueue_insert(&queue, rid, 0.0, 0); |
| 245 | db_prepare(&ins, "INSERT OR IGNORE INTO ok VALUES(:rid)"); |
| 246 | db_prepare(&q, "SELECT cid, mtime FROM plink WHERE pid=:rid"); |
| 247 | while( (N--)>0 && (rid = pqueue_extract(&queue, 0))!=0 ){ |
| 248 | db_bind_int(&ins, ":rid", rid); |
| 249 | db_step(&ins); |
| @@ -251,11 +251,11 @@ | |
| 251 | db_bind_int(&q, ":rid", rid); |
| 252 | while( db_step(&q)==SQLITE_ROW ){ |
| 253 | int pid = db_column_int(&q, 0); |
| 254 | double mtime = db_column_double(&q, 1); |
| 255 | if( bag_insert(&seen, pid) ){ |
| 256 | pqueue_insert(&queue, pid, mtime, 0); |
| 257 | } |
| 258 | } |
| 259 | db_reset(&q); |
| 260 | } |
| 261 | bag_clear(&seen); |
| 262 |
+1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -409,10 +409,11 @@ | ||
| 409 | 409 | # |
| 410 | 410 | TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 411 | 411 | |
| 412 | 412 | # With HTTPS support |
| 413 | 413 | ifdef FOSSIL_ENABLE_SSL |
| 414 | +TCC += -Dpqueue_insert=pqueue_insert_fossil | |
| 414 | 415 | TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR) |
| 415 | 416 | endif |
| 416 | 417 | |
| 417 | 418 | # With Tcl support |
| 418 | 419 | ifdef FOSSIL_ENABLE_TCL |
| 419 | 420 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -409,10 +409,11 @@ | |
| 409 | # |
| 410 | TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 411 | |
| 412 | # With HTTPS support |
| 413 | ifdef FOSSIL_ENABLE_SSL |
| 414 | TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR) |
| 415 | endif |
| 416 | |
| 417 | # With Tcl support |
| 418 | ifdef FOSSIL_ENABLE_TCL |
| 419 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -409,10 +409,11 @@ | |
| 409 | # |
| 410 | TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 411 | |
| 412 | # With HTTPS support |
| 413 | ifdef FOSSIL_ENABLE_SSL |
| 414 | TCC += -Dpqueue_insert=pqueue_insert_fossil |
| 415 | TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR) |
| 416 | endif |
| 417 | |
| 418 | # With Tcl support |
| 419 | ifdef FOSSIL_ENABLE_TCL |
| 420 |
+1
-3
| --- src/pqueue.c | ||
| +++ src/pqueue.c | ||
| @@ -69,14 +69,12 @@ | ||
| 69 | 69 | p->sz = N; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /* |
| 73 | 73 | ** Insert element e into the queue. |
| 74 | -** This is now named pqueue_insert2 to avoid a symbol naming | |
| 75 | -** conflict with OpenSSL. | |
| 76 | 74 | */ |
| 77 | -void pqueue_insert2(PQueue *p, int e, double v, void *pData){ | |
| 75 | +void pqueue_insert(PQueue *p, int e, double v, void *pData){ | |
| 78 | 76 | int i, j; |
| 79 | 77 | if( p->cnt+1>p->sz ){ |
| 80 | 78 | pqueue_resize(p, p->cnt+5); |
| 81 | 79 | } |
| 82 | 80 | for(i=0; i<p->cnt; i++){ |
| 83 | 81 |
| --- src/pqueue.c | |
| +++ src/pqueue.c | |
| @@ -69,14 +69,12 @@ | |
| 69 | p->sz = N; |
| 70 | } |
| 71 | |
| 72 | /* |
| 73 | ** Insert element e into the queue. |
| 74 | ** This is now named pqueue_insert2 to avoid a symbol naming |
| 75 | ** conflict with OpenSSL. |
| 76 | */ |
| 77 | void pqueue_insert2(PQueue *p, int e, double v, void *pData){ |
| 78 | int i, j; |
| 79 | if( p->cnt+1>p->sz ){ |
| 80 | pqueue_resize(p, p->cnt+5); |
| 81 | } |
| 82 | for(i=0; i<p->cnt; i++){ |
| 83 |
| --- src/pqueue.c | |
| +++ src/pqueue.c | |
| @@ -69,14 +69,12 @@ | |
| 69 | p->sz = N; |
| 70 | } |
| 71 | |
| 72 | /* |
| 73 | ** Insert element e into the queue. |
| 74 | */ |
| 75 | void pqueue_insert(PQueue *p, int e, double v, void *pData){ |
| 76 | int i, j; |
| 77 | if( p->cnt+1>p->sz ){ |
| 78 | pqueue_resize(p, p->cnt+5); |
| 79 | } |
| 80 | for(i=0; i<p->cnt; i++){ |
| 81 |
+2
-2
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -44,11 +44,11 @@ | ||
| 44 | 44 | Stmt ins; /* INSERT INTO tagxref */ |
| 45 | 45 | Stmt eventupdate; /* UPDATE event */ |
| 46 | 46 | |
| 47 | 47 | assert( tagType==0 || tagType==2 ); |
| 48 | 48 | pqueue_init(&queue); |
| 49 | - pqueue_insert2(&queue, pid, 0.0, 0); | |
| 49 | + pqueue_insert(&queue, pid, 0.0, 0); | |
| 50 | 50 | |
| 51 | 51 | /* Query for children of :pid to which to propagate the tag. |
| 52 | 52 | ** Three returns: (1) rid of the child. (2) timestamp of child. |
| 53 | 53 | ** (3) True to propagate or false to block. |
| 54 | 54 | */ |
| @@ -86,11 +86,11 @@ | ||
| 86 | 86 | while( db_step(&s)==SQLITE_ROW ){ |
| 87 | 87 | int doit = db_column_int(&s, 2); |
| 88 | 88 | if( doit ){ |
| 89 | 89 | int cid = db_column_int(&s, 0); |
| 90 | 90 | double mtime = db_column_double(&s, 1); |
| 91 | - pqueue_insert2(&queue, cid, mtime, 0); | |
| 91 | + pqueue_insert(&queue, cid, mtime, 0); | |
| 92 | 92 | db_bind_int(&ins, ":rid", cid); |
| 93 | 93 | db_step(&ins); |
| 94 | 94 | db_reset(&ins); |
| 95 | 95 | if( tagid==TAG_BGCOLOR ){ |
| 96 | 96 | db_bind_int(&eventupdate, ":rid", cid); |
| 97 | 97 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -44,11 +44,11 @@ | |
| 44 | Stmt ins; /* INSERT INTO tagxref */ |
| 45 | Stmt eventupdate; /* UPDATE event */ |
| 46 | |
| 47 | assert( tagType==0 || tagType==2 ); |
| 48 | pqueue_init(&queue); |
| 49 | pqueue_insert2(&queue, pid, 0.0, 0); |
| 50 | |
| 51 | /* Query for children of :pid to which to propagate the tag. |
| 52 | ** Three returns: (1) rid of the child. (2) timestamp of child. |
| 53 | ** (3) True to propagate or false to block. |
| 54 | */ |
| @@ -86,11 +86,11 @@ | |
| 86 | while( db_step(&s)==SQLITE_ROW ){ |
| 87 | int doit = db_column_int(&s, 2); |
| 88 | if( doit ){ |
| 89 | int cid = db_column_int(&s, 0); |
| 90 | double mtime = db_column_double(&s, 1); |
| 91 | pqueue_insert2(&queue, cid, mtime, 0); |
| 92 | db_bind_int(&ins, ":rid", cid); |
| 93 | db_step(&ins); |
| 94 | db_reset(&ins); |
| 95 | if( tagid==TAG_BGCOLOR ){ |
| 96 | db_bind_int(&eventupdate, ":rid", cid); |
| 97 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -44,11 +44,11 @@ | |
| 44 | Stmt ins; /* INSERT INTO tagxref */ |
| 45 | Stmt eventupdate; /* UPDATE event */ |
| 46 | |
| 47 | assert( tagType==0 || tagType==2 ); |
| 48 | pqueue_init(&queue); |
| 49 | pqueue_insert(&queue, pid, 0.0, 0); |
| 50 | |
| 51 | /* Query for children of :pid to which to propagate the tag. |
| 52 | ** Three returns: (1) rid of the child. (2) timestamp of child. |
| 53 | ** (3) True to propagate or false to block. |
| 54 | */ |
| @@ -86,11 +86,11 @@ | |
| 86 | while( db_step(&s)==SQLITE_ROW ){ |
| 87 | int doit = db_column_int(&s, 2); |
| 88 | if( doit ){ |
| 89 | int cid = db_column_int(&s, 0); |
| 90 | double mtime = db_column_double(&s, 1); |
| 91 | pqueue_insert(&queue, cid, mtime, 0); |
| 92 | db_bind_int(&ins, ":rid", cid); |
| 93 | db_step(&ins); |
| 94 | db_reset(&ins); |
| 95 | if( tagid==TAG_BGCOLOR ){ |
| 96 | db_bind_int(&eventupdate, ":rid", cid); |
| 97 |
+1
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -93,10 +93,11 @@ | ||
| 93 | 93 | # |
| 94 | 94 | TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 95 | 95 | |
| 96 | 96 | # With HTTPS support |
| 97 | 97 | ifdef FOSSIL_ENABLE_SSL |
| 98 | +TCC += -Dpqueue_insert=pqueue_insert_fossil | |
| 98 | 99 | TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR) |
| 99 | 100 | endif |
| 100 | 101 | |
| 101 | 102 | # With Tcl support |
| 102 | 103 | ifdef FOSSIL_ENABLE_TCL |
| 103 | 104 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -93,10 +93,11 @@ | |
| 93 | # |
| 94 | TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 95 | |
| 96 | # With HTTPS support |
| 97 | ifdef FOSSIL_ENABLE_SSL |
| 98 | TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR) |
| 99 | endif |
| 100 | |
| 101 | # With Tcl support |
| 102 | ifdef FOSSIL_ENABLE_TCL |
| 103 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -93,10 +93,11 @@ | |
| 93 | # |
| 94 | TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 95 | |
| 96 | # With HTTPS support |
| 97 | ifdef FOSSIL_ENABLE_SSL |
| 98 | TCC += -Dpqueue_insert=pqueue_insert_fossil |
| 99 | TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR) |
| 100 | endif |
| 101 | |
| 102 | # With Tcl support |
| 103 | ifdef FOSSIL_ENABLE_TCL |
| 104 |
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -93,10 +93,11 @@ | ||
| 93 | 93 | # |
| 94 | 94 | TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 95 | 95 | |
| 96 | 96 | # With HTTPS support |
| 97 | 97 | ifdef FOSSIL_ENABLE_SSL |
| 98 | +TCC += -Dpqueue_insert=pqueue_insert_fossil | |
| 98 | 99 | TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR) |
| 99 | 100 | endif |
| 100 | 101 | |
| 101 | 102 | # With Tcl support |
| 102 | 103 | ifdef FOSSIL_ENABLE_TCL |
| 103 | 104 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -93,10 +93,11 @@ | |
| 93 | # |
| 94 | TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 95 | |
| 96 | # With HTTPS support |
| 97 | ifdef FOSSIL_ENABLE_SSL |
| 98 | TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR) |
| 99 | endif |
| 100 | |
| 101 | # With Tcl support |
| 102 | ifdef FOSSIL_ENABLE_TCL |
| 103 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -93,10 +93,11 @@ | |
| 93 | # |
| 94 | TCC = gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 95 | |
| 96 | # With HTTPS support |
| 97 | ifdef FOSSIL_ENABLE_SSL |
| 98 | TCC += -Dpqueue_insert=pqueue_insert_fossil |
| 99 | TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR) |
| 100 | endif |
| 101 | |
| 102 | # With Tcl support |
| 103 | ifdef FOSSIL_ENABLE_TCL |
| 104 |