Ticket 1224: config.h removal patch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Ticket 1224: config.h removal patch

Christian Smith
Ticket:
http://www.sqlite.org/cvstrac/tktview?tn=1224

Contains an updated patch to remove config.h as a requirement for SQLite
source. This allows the cross-compile between platforms of different
pointer size (eg. 32bit->64bit) which is not possible with the current
config.h solution.

If anyone can review the patch and come up with a reason why it should not
be incorperated into the release, please pick holes in it.

DRH,
Assuming there are no problems (I've not found any in admittedly
restricted platform testing) could this patch be incorperated into 3.x?
It's certainly a neater, more portable way of handling what config.h is
currently used for, all regression tests pass on 32-bit Linux.

The patch is public domain.

Else, I can't be bothered maintaining the patch further while the sqlite3
structure is so volatile.

Christian

--
    /"\
    \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
     X                           - AGAINST MS ATTACHMENTS
    / \
Reply | Threaded
Open this post in threaded view
|

Re: Ticket 1224: config.h removal patch

Robert L Cochran
I tried applying this to the sqlite 3.2.1 source with these results:

[rlc@bobcp4 sqlite-3.2.1]$ patch -p0 < patch
patching file src/btree.c
Hunk #1 succeeded at 1216 (offset -3 lines).
patching file src/build.c
Hunk #1 succeeded at 1510 (offset 68 lines).
patching file src/expr.c
patching file src/main.c
Hunk #1 succeeded at 613 (offset -18 lines).
Hunk #2 succeeded at 640 with fuzz 2.
Hunk #3 succeeded at 698 (offset -19 lines).
patching file src/sqliteInt.h
Hunk #4 FAILED at 446.
1 out of 4 hunks FAILED -- saving rejects to file src/sqliteInt.h.rej
[rlc@bobcp4 sqlite-3.2.1]$ emacs patch
[rlc@bobcp4 sqlite-3.2.1]$ emacs src/sqliteInt.h.rej
[rlc@bobcp4 sqlite-3.2.1]$

Here are the rejects:

***************
*** 463,468 ****
Hash aFunc; /* All functions that can be in SQL exprs */
Hash aCollSeq; /* All collating sequences */
BusyHandler busyHandler; /* Busy callback */
Db aDbStatic[2]; /* Static space for the 2 default backends */
#ifdef SQLITE_SSE
sqlite3_stmt *pFetch; /* Used by SSE to fetch stored statements */
--- 446,452 ----
Hash aFunc; /* All functions that can be in SQL exprs */
Hash aCollSeq; /* All collating sequences */
BusyHandler busyHandler; /* Busy callback */
+ int busyTimeout; /* Busy handler timeout, in msec */
Db aDbStatic[2]; /* Static space for the 2 default backends */
#ifdef SQLITE_SSE
sqlite3_stmt *pFetch; /* Used by SSE to fetch stored statements */


Perhaps I've misapplied the patch?

Thanks

Bob Cochran


Christian Smith wrote:

>Ticket:
>http://www.sqlite.org/cvstrac/tktview?tn=1224
>
>Contains an updated patch to remove config.h as a requirement for SQLite
>source. This allows the cross-compile between platforms of different
>pointer size (eg. 32bit->64bit) which is not possible with the current
>config.h solution.
>
>If anyone can review the patch and come up with a reason why it should not
>be incorperated into the release, please pick holes in it.
>
>DRH,
>Assuming there are no problems (I've not found any in admittedly
>restricted platform testing) could this patch be incorperated into 3.x?
>It's certainly a neater, more portable way of handling what config.h is
>currently used for, all regression tests pass on 32-bit Linux.
>
>The patch is public domain.
>
>Else, I can't be bothered maintaining the patch further while the sqlite3
>structure is so volatile.
>
>Christian
>
>  
>

Reply | Threaded
Open this post in threaded view
|

Re: Ticket 1224: config.h removal patch

Christian Smith
On Tue, 24 May 2005, Robert L Cochran wrote:

>I tried applying this to the sqlite 3.2.1 source with these results:


Is that 3.2.1 release?


>
>[rlc@bobcp4 sqlite-3.2.1]$ patch -p0 < patch
> [snip failure]
>
>Perhaps I've misapplied the patch?


Patch is against CVS head revision. There have been a number of changes to
the sqlite3 data structure this last week, which broke my previous patch
(still in the ticket, BTW, dated May 10) hence this latest update. The May
10 patch should apply against the 3.2.1 release, though I haven't tested
the 3.2.1 release itself.


>
>Thanks
>
>Bob Cochran


Christian


>
>
>Christian Smith wrote:
>
>>Ticket:
>>http://www.sqlite.org/cvstrac/tktview?tn=1224
>>
>>Contains an updated patch to remove config.h as a requirement for SQLite
>>source. This allows the cross-compile between platforms of different
>>pointer size (eg. 32bit->64bit) which is not possible with the current
>>config.h solution.
>>
>>If anyone can review the patch and come up with a reason why it should not
>>be incorperated into the release, please pick holes in it.
>>
>>DRH,
>>Assuming there are no problems (I've not found any in admittedly
>>restricted platform testing) could this patch be incorperated into 3.x?
>>It's certainly a neater, more portable way of handling what config.h is
>>currently used for, all regression tests pass on 32-bit Linux.
>>
>>The patch is public domain.
>>
>>Else, I can't be bothered maintaining the patch further while the sqlite3
>>structure is so volatile.
>>
>>Christian
>>
>>
>>
>

--
    /"\
    \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
     X                           - AGAINST MS ATTACHMENTS
    / \