snprintf is not supported by VS.

This commit is contained in:
Cheng Zhao 2013-07-01 21:47:21 +08:00
parent 398c0a7c6a
commit 230173da1a

View file

@ -5,6 +5,7 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include "base/string_util.h"
#include "vendor/node/src/node.h" #include "vendor/node/src/node.h"
#include "vendor/node/src/node_version.h" #include "vendor/node/src/node_version.h"
@ -35,8 +36,8 @@ node::node_module_struct* GetBuiltinModule(const char *name, bool is_browser) {
char common[128]; char common[128];
char spec[128]; char spec[128];
node::node_module_struct *cur = NULL; node::node_module_struct *cur = NULL;
snprintf(common, sizeof(common), "atom_common_%s", name); base::snprintf(common, sizeof(common), "atom_common_%s", name);
snprintf(spec, sizeof(spec), base::snprintf(spec, sizeof(spec),
(is_browser ? "atom_browser_%s": "atom_renderer_%s"), (is_browser ? "atom_browser_%s": "atom_renderer_%s"),
name); name);
/* TODO: you could look these up in a hash, but there are only /* TODO: you could look these up in a hash, but there are only