X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Received: by 2002:ac8:4e89:0:b0:403:b6b0:bdb5 with SMTP id 9-20020ac84e89000000b00403b6b0bdb5mr11884qtp.7.1691208888580; Fri, 04 Aug 2023 21:14:48 -0700 (PDT) X-Received: by 2002:a05:6870:c794:b0:1ba:7bf5:67cd with SMTP id dy20-20020a056870c79400b001ba7bf567cdmr3729501oab.11.1691208888153; Fri, 04 Aug 2023 21:14:48 -0700 (PDT) Newsgroups: comp.os.msdos.djgpp Date: Fri, 4 Aug 2023 21:14:47 -0700 (PDT) In-Reply-To: <647e9566-9ad9-35fe-f937-8adda1ef7d92@gmail.com> Injection-Info: google-groups.googlegroups.com; posting-host=36.90.226.230; posting-account=ChV2iAoAAADZk8Usbgzl1z77-oviXA_b NNTP-Posting-Host: 36.90.226.230 References: <43bcdb29-6ac3-4cdf-a0ca-e73adb60bf91 AT googlegroups DOT com> <647e9566-9ad9-35fe-f937-8adda1ef7d92 AT gmail DOT com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: compilation of sqlite3 on dos using djgpp From: "HILMAN AHWAS A. (hilmanahwaa AT gmail DOT com) [via djgpp AT delorie DOT com]" Injection-Date: Sat, 05 Aug 2023 04:14:48 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 3443 Bytes: 3624 Lines: 61 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 3754U2CX031559 Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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; inRegion; 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