delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2023/02/24/13:43:33

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20210112;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:to:subject:user-agent:mime-version:date:message-id:from
:to:cc:subject:date:message-id:reply-to;
bh=Og9BNvMFTe2KdqdSCaiy3Fd2QYAdFuHE5GxzYvpjwSU=;
b=BW5fUIptLh47Xrmqxw8cH6b8l5Sw5TyRasaxqNsPAIpyaqOFeqyhlPXOctIASA6xsh
+ZCvesGwRrjlDZfI6AgHMW6Wk7GZDdv0h7YbhiDk+fRq6aq8plhPTn6oli8sMzNF4Qks
0q08xrm3qeL0ZlSFpyHkKB/hy+vM1b2PS5Rqx6BxzWeX+yLqUASZQ9u+Bh/4ffaZc2ov
pBEBJSKYzVMcVLMGKg36HsTb86kGgDmde/pK1E6O4ONuXy1e8p0Y6aBthTnkyASOA99N
QOgdhlhvyKvVDi+clUzyt/h0VWXeeYMd0bwUEMP/orghe6yLHJ36yjfPQ9XCa1EQpv0c
TkkQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=Og9BNvMFTe2KdqdSCaiy3Fd2QYAdFuHE5GxzYvpjwSU=;
b=iE8xqeOej884wixvGZY24E/zm9ydTL1psByTOGWddiOsfTRRIaukN/GYtrElU7CuAT
IeL1g659srw9aniIXIRIiVptFZyFCIG7m3u/VSRcAbpLzI/k0SPIjYJU+8bhMhLLvRbB
ubwhnga5hzyjdCVVFYQzweB+PVr8qSSOph7Dnzm6atuDMOxcMqPNBQfDShkPOWDkkRUZ
lOOL5KOG9zoQGhPoApEvt1a2hBvSYxWjrKyycZwrVYuq6/4m78N10rqocof5j9Niny9m
Qu0yhS0Qt0tWjVHEKf9693oP2r2IU2LsmEPIZg8JmB2t9x75TzNZSmle4ECikrIsJ1HF
QYAA==
X-Gm-Message-State: AO0yUKXS1jzXEFrRbuk0+RIVGcRYRbQsA/2DvxH5yWSMK9NrcKLee8Kw
OdSwfNWXquZjZ9IcAMJCVqE4JFjsTdEz3Q==
X-Google-Smtp-Source: AK7set9xy+NduR2mgUVmYEJFcvEfPw+Wd1brc+/xMRTp4YZLXnxdeVsaPQKgMNlZR4La7vLdaXGOzA==
X-Received: by 2002:a05:622a:1481:b0:3b9:b6b7:90c5 with SMTP id t1-20020a05622a148100b003b9b6b790c5mr27279834qtx.49.1677263905736;
Fri, 24 Feb 2023 10:38:25 -0800 (PST)
Message-ID: <647e9566-9ad9-35fe-f937-8adda1ef7d92@gmail.com>
Date: Fri, 24 Feb 2023 13:38:23 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Subject: Re: compilation of sqlite3 on dos using djgpp
To: djgpp AT delorie DOT com
References: <43bcdb29-6ac3-4cdf-a0ca-e73adb60bf91 AT googlegroups DOT com>
<e968bcf9-dc60-48cf-b071-51186badd430 AT googlegroups DOT com>
<e2405853-1614-4aae-b290-9f094171af07n AT googlegroups DOT com>
From: "Frank Sapone (emoaddict15 AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
In-Reply-To: <e2405853-1614-4aae-b290-9f094171af07n@googlegroups.com>
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

On 2/22/2023 9:57 AM, HILMAN AHWAS A. (hilmanahwaa AT gmail DOT com) [via 
djgpp 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019