Giter VIP home page Giter VIP logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
sprintf_s() is a function provided by Visual C++ 
http://msdn.microsoft.com/en-us/library/ce3zzk1k(v=vs.80).aspx

snprintf() is a C99 standard function that VC does not provide.

What does you platform provide for the same function?

Do you have any suggestion for better compatibly?

Original comment by [email protected] on 31 Jan 2012 at 7:52

from rapidjson.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
snprintf() exist on this platform (MarmaladeSDK), but project build with non 
system librares in visual studio (VS compiler for x86; gcc for ARM/MIPS or RVCT 
for ARM) or xcode(gcc).

Simple solution is to create #define like PLATFORM_UNKNOWN with minimal 
functionality (for open source compilers like gcc). User can be set this in 
configuration header file to turn off platforms specific features like 
sprintf_s. 

Please look this example 
http://cocos2d-x.org/projects/cocos2d-x/repository/revisions/master/entry/cocos2
dx/platform/CCPlatformConfig.h - this is multiplatform game engine platform 
detection header.

Original comment by [email protected] on 31 Jan 2012 at 8:56

from rapidjson.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
This issue won't be fixed recently.
In future, I will try to abstract most functions like this, and may provide 
custom number to string converter internally to remove the dependency on 
snprintf().

Original comment by [email protected] on 19 Feb 2012 at 3:47

  • Changed state: WontFix

from rapidjson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.