From a1ff22cb7eeac941403117f82d6d8e188836fbee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Wed, 6 Aug 2014 11:47:08 +0200 Subject: [PATCH] include: avoid using C++ 'template' reserved word Closes #1394 --- include/uv.h | 2 +- src/unix/fs.c | 4 ++-- src/win/fs.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uv.h b/include/uv.h index 896d907c..df6d9549 100644 --- a/include/uv.h +++ b/include/uv.h @@ -1892,7 +1892,7 @@ UV_EXTERN int uv_fs_write(uv_loop_t* loop, uv_fs_t* req, uv_file file, UV_EXTERN int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb); -UV_EXTERN int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_t* req, const char* template, +UV_EXTERN int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_t* req, const char* tpl, uv_fs_cb cb); UV_EXTERN int uv_fs_rmdir(uv_loop_t* loop, uv_fs_t* req, const char* path, diff --git a/src/unix/fs.c b/src/unix/fs.c index 6e25fe3b..47f66722 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -1009,10 +1009,10 @@ int uv_fs_mkdir(uv_loop_t* loop, int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_t* req, - const char* template, + const char* tpl, uv_fs_cb cb) { INIT(MKDTEMP); - req->path = strdup(template); + req->path = strdup(tpl); if (req->path == NULL) return -ENOMEM; POST; diff --git a/src/win/fs.c b/src/win/fs.c index e8b080fc..8b52e610 100644 --- a/src/win/fs.c +++ b/src/win/fs.c @@ -1797,13 +1797,13 @@ int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, } -int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_t* req, const char* template, +int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_t* req, const char* tpl, uv_fs_cb cb) { int err; uv_fs_req_init(loop, req, UV_FS_MKDTEMP, cb); - err = fs__capture_path(loop, req, template, NULL, TRUE); + err = fs__capture_path(loop, req, tpl, NULL, TRUE); if (err) return uv_translate_sys_error(err);