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 Message-Id: <5.1.1.6.0.20021129094805.00a1f6a0@mail.ozemail.com.au> X-Sender: wdale AT mail DOT ozemail DOT com DOT au Date: Fri, 29 Nov 2002 09:48:37 +1100 To: cygwin AT cygwin DOT com From: Warren Dale Subject: Using -mno-cygwin Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed I am a happy Cygwin user. I am trying to convert a program so that it will be Cygwin independent. I have struck two problems: ---------- (1) The program compiles and links clean, but is unable to use printf() to display a "long long" variable. $ cat test1.c #include int main(void) { long long number = 123456789012; printf("%lld\n", number); return(0); } $ gcc -Wall -Wshadow test1.c -s -o test1 $ ./test1 123456789012 $ gcc -Wall -Wshadow -mno-cygwin test1.c -s -o test1 $ ./test1 -1097262572 $ QUESTION 1: Should "long long" be fully supported in mingw32? It seems that the compiler and the library do not agree. ---------- (2) A program using snprintf() compiles clean, but cannot link. $ cat test2.c #include int main(void) { char buffer[20]; long number = 12345678; snprintf(buffer, sizeof(buffer), "%lld\n", number); return(0); } $ gcc -Wall -Wshadow test2.c -s -o test2 {no errors} $ gcc -Wall -Wshadow -mno-cygwin test2.c -s -o test2 /cygdrive/c/WINDOWS/TEMP/ccaayW3m.o(.text+0x2a):test2.c: undefined reference to `snprintf' collect2: ld returned 1 exit status $ QUESTION 2: Should "snprintf()" be fully supported in mingw32? It seems that the compiler and the library do not agree. ---------- In both cases I can code around the limitations if I have to. Regards, Warren. Warren Dale Email: wdale AT ozemail DOT com DOT au Mobile: 0412-700-966 Home: (02) 9482-8552 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/