Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2018-05-15 22:34:49 +0300
committerJames M Snell <jasnell@gmail.com>2018-05-21 00:15:56 +0300
commit7f0f978affda555c5f7151f2d6abd212e753d4f1 (patch)
tree3f40904376635a00f0a15cd33186be09715e903c /src/node_constants.cc
parenta14a0fa8dc401188f67d26a82daae9423c54b41f (diff)
fs: refactor fs module
PR-URL: https://github.com/nodejs/node/pull/20764 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'src/node_constants.cc')
-rw-r--r--src/node_constants.cc24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/node_constants.cc b/src/node_constants.cc
index 68339c00328..c1e39244b35 100644
--- a/src/node_constants.cc
+++ b/src/node_constants.cc
@@ -1162,6 +1162,27 @@ void DefineSystemConstants(Local<Object> target) {
#ifdef X_OK
NODE_DEFINE_CONSTANT(target, X_OK);
#endif
+
+#ifdef UV_FS_COPYFILE_EXCL
+# define COPYFILE_EXCL UV_FS_COPYFILE_EXCL
+ NODE_DEFINE_CONSTANT(target, UV_FS_COPYFILE_EXCL);
+ NODE_DEFINE_CONSTANT(target, COPYFILE_EXCL);
+# undef COPYFILE_EXCL
+#endif
+
+#ifdef UV_FS_COPYFILE_FICLONE
+# define COPYFILE_FICLONE UV_FS_COPYFILE_FICLONE
+ NODE_DEFINE_CONSTANT(target, UV_FS_COPYFILE_FICLONE);
+ NODE_DEFINE_CONSTANT(target, COPYFILE_FICLONE);
+# undef COPYFILE_FICLONE
+#endif
+
+#ifdef UV_FS_COPYFILE_FICLONE_FORCE
+# define COPYFILE_FICLONE_FORCE UV_FS_COPYFILE_FICLONE_FORCE
+ NODE_DEFINE_CONSTANT(target, UV_FS_COPYFILE_FICLONE_FORCE);
+ NODE_DEFINE_CONSTANT(target, COPYFILE_FICLONE_FORCE);
+# undef COPYFILE_FICLONE_FORCE
+#endif
}
void DefineCryptoConstants(Local<Object> target) {
@@ -1305,9 +1326,6 @@ void DefineConstants(v8::Isolate* isolate, Local<Object> target) {
// Define libuv constants.
NODE_DEFINE_CONSTANT(os_constants, UV_UDP_REUSEADDR);
- NODE_DEFINE_CONSTANT(fs_constants, UV_FS_COPYFILE_EXCL);
- NODE_DEFINE_CONSTANT(fs_constants, UV_FS_COPYFILE_FICLONE);
- NODE_DEFINE_CONSTANT(fs_constants, UV_FS_COPYFILE_FICLONE_FORCE);
os_constants->Set(OneByteString(isolate, "dlopen"), dlopen_constants);
os_constants->Set(OneByteString(isolate, "errno"), err_constants);