From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22924 invoked by alias); 11 Jul 2012 08:59:02 -0000 Received: (qmail 22741 invoked by uid 22791); 11 Jul 2012 08:59:01 -0000 X-SWARE-Spam-Status: No, hits=0.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-lb0-f171.google.com (HELO mail-lb0-f171.google.com) (209.85.217.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Jul 2012 08:58:48 +0000 Received: by lbom4 with SMTP id m4so1447749lbo.2 for ; Wed, 11 Jul 2012 01:58:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=ejLhgUK78UbaYIrRERRTUrzYcF3DI4p+Ef1F8l/Jn0M=; b=On9GjDRQjyDVckClT4B2rIr4+Y7btt9QzDefOWYj+aGx+g2uUzqNyrEZiYTb5FLICY d46cMJHzKBlzdfQElBY7Z66nENcd8IvjdUM0lj8TYeQNGURG89tz0tE237vspPRG+qVc 6xQfHcJmJ0hVZTSpeW91Zib8h7nInYvhs5ItSuLNEulslYGEENBtclJtV3CJCB1g+fVG NaTEHTPe3MlwTBoA4uiuodDFny/vEmz9zVswgcXKGGsYK0eUIzquOAbs1UmBGrP8qGb2 6QFNz1dcCMvaEok20coK7e7nSwJpTLD/lXsW1STM0HbQilK0Ey28DCVJZcFfJkRMuPLe G2KQ== MIME-Version: 1.0 Received: by 10.112.39.135 with SMTP id p7mr21781967lbk.78.1341997126456; Wed, 11 Jul 2012 01:58:46 -0700 (PDT) Received: by 10.112.48.74 with HTTP; Wed, 11 Jul 2012 01:58:46 -0700 (PDT) Date: Wed, 11 Jul 2012 08:59:00 -0000 Message-ID: Subject: sleep removed ? From: Herbert Groot Jebbink To: cygwin@cygwin.com Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkWShJ4T2DN4c03k8FT/w0OANZ9S6pzRJNoPTZ72NczznJ6mO5/hqLUGYpKqhaGf8kz9CX6 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-07/txt/msg00159.txt.bz2 Hi, I was asked to make a little change in a c program from 10+ years ago. The change itself was not the problem, but the environment is changed and I did have compile problems. Old: Cygwin: 1.3.2 (0.39/3/2) 2001-05-20 23:28 New: Cygwin: 1.7.15 (0.260/5/3) 2012-05-09 10:25 The problem was the sleep statement, that was not working anymore: /home/herbert/project/main.c:124: undefined reference to `_sleep' Below (the relevant parts of) the old code: #include /* Extra defenition for avoiding warning at compiling */ #ifndef UNIX unsigned int sleep(int); /* somehow, compiler don't understand it completely */ #endif #ifdef UNIX sleep(1); #else sleep(1000); #endif I changed it into: #ifdef _WIN32 # include # define sleep(x) Sleep(1000 * x) #else # include #endif sleep(1); It compiles now, but is it also correct ? The executable did go from 251 KB to 1034 KB, is this caused by windows.h that is now included and not in the old version ? Kind Regards, Herbert -- 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