X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Authentication-Results: msg-ip2.usc.edu; dkim=neutral (message not signed) header.i=none X-IronPort-AV: E=Sophos;i="4.87,396,1363158000"; d="scan'208";a="1172092123" Date: Tue, 02 Apr 2013 18:07:35 -0800 From: Mikhail Ryazanov Subject: snprintf not found Sender: ryazanov AT usc DOT edu To: djgpp AT delorie DOT com Message-id: <515B8EE7.4060603@usc.edu> Organization: USC MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 Reply-To: djgpp AT delorie DOT com Hello! I have a problem compiling programs with snprintf (actually, vsnprintf) function. Although it is described in the documentation [http://www.delorie.com/djgpp/doc/libc/libc_732.html] and is present in the provided header files, a simple test program #include int main(void) { return snprintf(NULL, 0, "%d", 123); } fails to compile both in C++ mode: ... error: 'snprintf' was not declared in this scope (playing with and various possible scopes does not help) and in C: ... warning: implicit declaration of function 'snprintf' [-Wimplicit-function-declaration] ... warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default] ... undefined reference to `snprintf' I found a probably related discussion at [http://cygwin.com/ml/cygwin/2012-04/msg00140.html] (about one year ago), but it seems that there the problem was only for particular "-std=" choices, whereas current DJGPP fails with _any_ kind of C/C++ standard (including "gnu..."). Am I doing something wrong, or it is a bug? P.S. For comparison, gcc 4.6.1 in Debian works fine. -- Best regards, Mikhail Ryazanov