Mail Archives: djgpp/2023/08/05/00:30:12
On Saturday, February 25, 2023 at 1:43:44 AM UTC+7, Frank Sapone (emo DOT DOT DOT AT gmail DOT com) [via djgpp AT delorie DOT com] wrote:
> On 2/22/2023 9:57 AM, HILMAN AHWAS A. (hilma DOT DOT DOT AT gmail DOT com) [via
> dj DOT DOT DOT AT delorie DOT com] wrote:
> > On Monday, February 18, 2013 at 2:02:33 AM UTC+7, <@email omitted> wrote:
> >> Well, on a lazy Sunday afternoon I tried to compile SQLite too.
> >>
> >> The following steps allowed to compile it:
> >>
> >> 1. run "configure --disable-threadsafe"
> >>
> >> 2. modify this in sqlite3.c:
> >>
> >> #ifdef __DJGPP__
> >> { "fstat", 0, 0 },
> >> //#define osFstat(a,b,c) 0
> >> #define osFstat(a,b) 0 //djgpp - replacing above
> >> #define MAP_SHARED 0
> >> #define MAP_FAILED 0
> >> #define ETIMEDOUT 9000 //unused number
> >> #define ENOTCONN 9001 //unused number
> >>
> >> #else
> >>
> >> 3. take out munmap:
> >>
> >> for(i=0; i<p->nRegion; i++){
> >> if( p->h>=0 ){
> >> //djgpp munmap(p->apRegion[i], p->szRegion);
> >> }else{
> >> sqlite3_free(p->apRegion[i]);
> >> }
> >> }
> >>
> >> 4. take out mmap:
> >>
> >> if( pShmNode->h>=0 ){
> >> /* djgpp
> >> pMem = mmap(0, szRegion,
> >> pShmNode->isReadonly ? PROT_READ : PROT_READ|PROT_WRITE,
> >> MAP_SHARED, pShmNode->h, szRegion*(i64)pShmNode->nRegion
> >> );
> >> */
> >> if( pMem==MAP_FAILED ){
> >> rc = unixLogError(SQLITE_IOERR_SHMMAP, "mmap", pShmNode->zFilename);
> >> goto shmpage_out;
> >> }
> >>
> >>
> >> Then it did compile and seemed to work so far. The library does not use mmap, only the shell program sqlite3.exe does and I guess that will work so far without mmap in DOS.
> >>
> >> Georg
> > Where do I place those lines of code?
> According to Georg's instructions sqlite3.c from the source code.
>
> Frank
In what line numbers? I've obtained the 3.42.0 amalgamation source code
- Raw text -