Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 20 Apr 2004 17:18:33 -0700 From: Yitzchak Scott-Thoennes To: cygwin AT cygwin DOT com Subject: lseek returning 2**32-1 on error instead of -1 Message-ID: <20040421001833.GA3836@efn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Organization: bs"d X-IsSubscribed: yes Using the latest snapshot 20040420 (though I think it may have been this way since at least 1.5.2): $ cat lseeker.c #include #include #include #include int main(int argc, char **argv) { off_t offset = -1, result; printf ("offsets are size %d.\n", sizeof (off_t)); printf ("offsets are %s.\n", ( offset < 0 ? "signed" : "unsigned" )); printf ("seeking to offset %lld.\n", offset); errno = 0; result = lseek (fileno (stdin), offset, SEEK_CUR); printf ("got %lld (%s).\n", result, strerror (errno)); return 0; } $ gcc -Wall lseeker.c; ./a.exe