X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: From: Hongliang Wang To: Subject: How does Cygwin support Large files? Date: Mon, 29 Oct 2007 14:32:50 +0000 Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l9TEWxqd007685 Hello all, My platform is WindowsXP+SP2, Cygwin DLL release version is 1.5.24-2 I am trying to make my program support large files, so in stdio.h I found 356 #ifdef __LARGE64_FILES 357 #if !defined(__CYGWIN__) || defined(_COMPILING_NEWLIB) However, when I tried to compile with _COMPILING_NEWLIB, it fails $ cat test.c #include #include #include #include int main(int argc, char *argv[]) { FILE *p= fopen64("test.c", "r"); int c; #ifdef _COMPILING_NEWLIB printf("newlib\n"); #endif p++; c= fgetc(p); printf("c= %d\n", c); return 0; } $ gcc -Wall -D_COMPILING_NEWLIB test.c -o test /cygdrive/c/DOCUME~1/wan/LOCALS~1/Temp/ccUmErSH.o:test.c:(.text+0x3a): undefined reference to `_fopen64' collect2: ld returned 1 exit status It seems as if fopen64 is mapped to _fopen64, while the latter is missing. Could anybody tell me how to compile with _COMPILING_NEWLIB flag or how does Cygwin support large files? Many many thanks! _________________________________________________________________ Connect to the next generation of MSN Messenger  http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/