delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/07/01/09:38:40

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:from:to:subject:mime-version:message-id:date
:content-transfer-encoding:content-type; q=dns; s=default; b=nKG
Amzf1ViDqJy0SKn12qQs2qcpISw0Gj+sesFNtlAIUoEac7BvnuLSIRLtfOU9ojD4
SxOtgxqQ6p/BjrJyDOIvn2LtDRkskjs//FXsDc5gqzhYkFF4cJr64BiI7m/aCSSg
P6HRqyAaHsbayruTaZOANiAT0K4+/g3wn/Bereas=
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:from:to:subject:mime-version:message-id:date
:content-transfer-encoding:content-type; s=default; bh=XvyQdhDEv
4IC6Uv0i462P+7G1AI=; b=ZaBjcohYAfHrF8LIxsnKA3Et75Ik8ZD7WQ30uYuFu
se8Kos78+DH9LZU81yZ/8c+mLE7TIRPOixfYgDye6CGoQbUDcWM3FqYF8s1NMFnd
1jd6kOAIaLUIOTpNYC++cIWDDvLuXnwQzyXpGMfILsfYO+xaWhIpoFi0+9DJu0TA
k4=
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=3.1 required=5.0 tests=AFFECTIONATE_BODY,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=ioctl, AF_INET, cygwin-x86, af_inet
X-HELO: forward14j.cmail.yandex.net
Authentication-Results: mxback5j.mail.yandex.net; dkim=pass header.i=@yandex.ru
From: =?utf-8?B?0JHQsNCx0LXQvdC60L4g0JLRj9GH0LXRgdC70LDQsg==?= <nikkybox AT yandex DOT ru>
To: cygwin AT cygwin DOT com
Subject: Re: The function ioctl bug
MIME-Version: 1.0
Message-Id: <4441041467380288@web29j.yandex.ru>
Date: Fri, 01 Jul 2016 23:38:08 +1000

Dear friends!

The function ioctl return -1 (errno equal 95) if I use cygwin-x86_64 but return 0 if I use cygwin-x86.

#include <stdio.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <errno.h>

int main()
{
    int c;
    int fd = socket(AF_INET, SOCK_STREAM, 0);
    if (ioctl(fd, FIONREAD, &c) == -1)
        printf("errno:%u\n", errno);
    close(fd);
    return 0;
}

--
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