This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

stdio.h patches for g++ -std=c++11


Hi

This is a patch for exposing the new stdio functions added by the c++11 standard. Without this patch the snprintf for example is not exposed as

$ cat hello.cpp
#include <cstdio>

int main(int argc, char** argv) {
char buf[24];
snprintf(buf, 2, "", 2);
return 0;
}

$ g++ -std=c++11 hello.cpp
hello.cpp: In function ‘int main(int, char**)’:
hello.cpp:4:30: erreur: ‘snprintf’ was not declared in this scope
snprintf("", 2, "", 2);

$ g++ -xc++ -std=c++11 -dM -E - < /dev/null | sort | grep ANSI
#define __STRICT_ANSI__ 1

$ g++ -dM -E - < /dev/null | sort | grep ANSI

$

Regards



Attachment: stdio.h.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]