Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 14356 invoked from network); 10 Sep 2007 20:35:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Sep 2007 20:35:57 -0000 Received: (qmail 1525 invoked by uid 500); 10 Sep 2007 20:35:49 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 1476 invoked by uid 500); 10 Sep 2007 20:35:49 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 1465 invoked by uid 99); 10 Sep 2007 20:35:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2007 13:35:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [85.158.176.73] (HELO server173-han.de-nserver.de) (85.158.176.73) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2007 20:35:46 +0000 Received: (qmail 28175 invoked from network); 10 Sep 2007 22:35:07 +0200 Received: from www.myarm.info (HELO [192.168.0.6]) (87.139.49.240) (smtp-auth username stefan@ruppert-it.de, mechanism plain) by server173-han.de-nserver.de (qpsmtpd/0.40) with ESMTPA; Mon, 10 Sep 2007 22:35:07 +0200 Message-ID: <46E5AA85.9080406@ruppert-it.de> Date: Mon, 10 Sep 2007 22:35:17 +0200 From: Stefan Ruppert User-Agent: Icedove 1.5.0.12 (X11/20070607) MIME-Version: 1.0 To: dev@apr.apache.org Subject: scanf() family functions in apr? Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-User-Auth: Auth by stefan@ruppert-it.de through 87.139.49.240 X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I'm currently finishing a linux to windows port using apr and mingw and stumbled over the 64-bit integer problem. Normally gcc uses %lld/%llu for 64-bit integers for printf() and scanf() like functions. But mingw uses the microsoft %I64d/%I64u style formatting. So I introduced a define for using these different formatting strings like #ifdef MINGW #define INT64FMT "%I64d" #else #define INT64FMT "%lld" #endif Now I used this define in scanf()/printf() functions but also in my own my_snprintf() function which just wraps apr_vsnprintf() function. But the apr version for sure does not support the windows style 64-bit formatting string. Now it would be very nice if there would be an apr_scanf() function which just also uses the "%lld" string! Any chances for such a function? Also related to formatting functions, I currently use the ANSI-C versions for file i/o because there is no apr_file_vprintf() function! What about this function? I' really need it, to write my own functions which can prepand a prefix to any output... Regards, Stefan