delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/06/19/15:30:39

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:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=igv
lSthdCk6TySavsmmY8DhBfyqxVaFZyXdq6wSdc9jya1auymX6PXBRD2MijrAKB5K
oH/2oIgdUf9ua5VU4Qdr4gAMtp09DG+No8a1WIuaZ/SuWZcrbh8hZWyMb1Sc0Plz
TjZXsNus21ZIDQZvl/r2LoNz0uOqDFtqJeZGNXdU=
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:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; s=default; bh=TJ8d24K2H
FnwmGdtXmsmGNyXAfg=; b=B22iCe6a1vXIxlLYZaQqEcESOVYodHqQlieOWMlW2
fMMGLEG5/7x8elQBBX/c74rF80tzWAzNPsZtGaz8rNbXUT2BzzKPfwXJ41Z5FDya
SySg+XRFvJNcCl+XISW+mUIJR6oBwy5P3ZyqaU1h0ybUwBCpWF2Nqw1GAONRml4s
80=
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=-4.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=gettimeofday, H*M:post
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: Stephen Sheldon <sfsheldo AT gmail DOT com>
Subject: gettimeofday not defined
Date: Sun, 19 Jun 2016 19:30:11 +0000 (UTC)
Lines: 25
Message-ID: <loom.20160619T212652-82@post.gmane.org>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes

Sometime in the past several months MPlayer stopped compiling for Cygwin.  There
was a complaint about gettimeofday not being defined.  The failing file did
include sys/time.h, which contains a definition.  I found one similar report
on the Cygwin mailing list.  I noticed that MPlayer was putting the macro
"-D_ISOC99_SOURCE=1" on the gcc command line.  I replaced it with
"-D_DEFAULT_SOURCE=1" and MPlayer compiled.  It also works without any
...SOURCE.

Here is a small test case to show the problem:

//#define _ISOC99_SOURCE 1
#define _DEFAULT_SOURCE 1
#include <sys/time.h>

int main() {
    struct timeval start;

    gettimeofday(&start, NULL);
}

It compiles with _DEFAULT_SOURCE or without any ...SOURCE. I hope someone can
examine the very complicated #if statements in sys/feature.h and sys/time.h
and tell me that whether I should raise the issue  with the MPLayer folks or
not.



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