delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/01/30/15:19:33

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:reply-to:mime-version:to
:subject:references:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=kufRRnjgq0zmR+WQ
cFxn4VCQMYVrRbD8+zjOuJdPWoTbbOmKs+Jix8oTxQnVi4oi+mnNbZeD/QzcBEnQ
ldqOMurQ6VT876faajY0xRGBZ/1YT7Yi8myWr4adb91xsrFogn/1DBDPF7mPna9I
fMHhqwkBvfLZ5I3rORzj6lK2sug=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:reply-to:mime-version:to
:subject:references:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=8lXAH44SzmVsb1kJTJrRki
RbIvY=; b=uAXkKl8+8s/DzIUTzXO4w5CBWmQ1cvFd6vJlu65AnRizkWgIYRWrOe
rkj2QQxAUVSQlMjf4rMDCnRxf9hXNru6KzyViV0X8+nRIq4ppWgwiyR093ZLWuEF
/ER+0FKwbHsjx/jGGZLo+5BmayjBeCWKMi6tAFuFPdkGK8tpshL2U=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: vms173023pub.verizon.net
Message-id: <52EAB3B9.4030505@cygwin.com>
Date: Thu, 30 Jan 2014 15:19:05 -0500
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-to: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: second call to mmap() results in error
References: <20140129181250 DOT GW2821 AT calimero DOT vinschen DOT de> <52E95786 DOT 8050606 AT gmail DOT com> <20140130095822 DOT GY2821 AT calimero DOT vinschen DOT de> <001801cf1db6$66c47c40$344d74c0$@lbmsys.com> <20140130124558 DOT GA2821 AT calimero DOT vinschen DOT de> <003801cf1dbd$fc3ffc70$f4bff550$@lbmsys.com> <20140130170142 DOT GD2821 AT calimero DOT vinschen DOT de> <5F8AAC04F9616747BC4CC0E803D5907D0C4763CC AT MLBXv04 DOT nih DOT gov> <52EA9A53 DOT 2050203 AT cygwin DOT com> <5F8AAC04F9616747BC4CC0E803D5907D0C4764C5 AT MLBXv04 DOT nih DOT gov> <20140130183956 DOT GA3573 AT ednor DOT casa DOT cgf DOT cx> <5F8AAC04F9616747BC4CC0E803D5907D0C4764ED AT MLBXv04 DOT nih DOT gov> <52EA9EA2 DOT 5030202 AT cygwin DOT com> <5F8AAC04F9616747BC4CC0E803D5907D0C476528 AT MLBXv04 DOT nih DOT gov> <52EAA171 DOT 406 AT cygwin DOT com> <5F8AAC04F9616747BC4CC0E803D5907D0C4765D8 AT MLBXv04 DOT nih DOT gov> <52EAA848 DOT 7070808 AT cygwin DOT com> <5F8AAC04F9616747BC4CC0E803D5907D0C477869 AT MLBXv04 DOT nih DOT gov>
In-reply-to: <5F8AAC04F9616747BC4CC0E803D5907D0C477869@MLBXv04.nih.gov>

On 1/30/2014 2:46 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:

> OP privately wrote:
>
>> The problem is also fixed by correct type-casting in the calls to mmap() ...
>>
>>   mmap1 = mmap(NULL, (size_t) 524304, PROT_WRITE | PROT_READ, MAP_SHARED,
>> shm_fd1, 0);
>>
>> The address returned from the call to mmap() -- with or without the
>> ftruncate() -- was bad without the (size_t) specification.
>
> (note "with or without ftruncate()")
>
> And I ask again (last time, I promise), how on Earth adding <unistd.h> to
> the code below would make the code suddenly working?  (Like I said before,
> that code worked for me, with -Wall showing nothing, from the very beginning.)

OK, I didn't realize you were asking Steve specifically, on list, to
clarify a statement he made to you in a private message.  And now that I
recognize which code you've been thinking about when you've been asking
questions throughout this thread, I can only tell you the behavior I see
with it, which doesn't match yours if I understand correctly what you've
been seeing.  That said, it really doesn't matter what I see if you want to
know more details specifically from Steve.  Given that, I'll bow out of
this thread.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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