summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-07-31 23:45:25 +0800
committerruki <[email protected]>2022-07-31 23:45:25 +0800
commit63bf72bac39ea83aed26dc63d68aee67a3383a4a (patch)
tree48ef2340f04e95592847fd73e69d0d64f2545b85
parentbb28bbb01c73ab1d7e455479f3338466a983d7d4 (diff)
fix touch
-rwxr-xr-xcore/src/tbox/inc/bsd/tbox.config.h2
-rwxr-xr-xcore/src/tbox/inc/cygwin/tbox.config.h2
-rwxr-xr-xcore/src/tbox/inc/iphoneos/tbox.config.h2
-rwxr-xr-xcore/src/tbox/inc/linux/tbox.config.h2
-rwxr-xr-xcore/src/tbox/inc/macosx/tbox.config.h2
-rwxr-xr-xcore/src/tbox/inc/mingw/tbox.config.h2
-rwxr-xr-xcore/src/tbox/inc/msys/tbox.config.h2
-rw-r--r--xmake/core/base/os.lua1
8 files changed, 15 insertions, 0 deletions
diff --git a/core/src/tbox/inc/bsd/tbox.config.h b/core/src/tbox/inc/bsd/tbox.config.h
index 59160967c..7101e4d67 100755
--- a/core/src/tbox/inc/bsd/tbox.config.h
+++ b/core/src/tbox/inc/bsd/tbox.config.h
@@ -185,6 +185,8 @@
#define TB_CONFIG_POSIX_HAVE_PIPE2 1
#define TB_CONFIG_POSIX_HAVE_MKFIFO 1
#define TB_CONFIG_POSIX_HAVE_MMAP 1
+#define TB_CONFIG_POSIX_HAVE_FUTIMENS 1
+#define TB_CONFIG_POSIX_HAVE_UTIMENSAT 1
// windows functions
/* #undef TB_CONFIG_WINDOWS_HAVE__INTERLOCKEDEXCHANGE */
diff --git a/core/src/tbox/inc/cygwin/tbox.config.h b/core/src/tbox/inc/cygwin/tbox.config.h
index fea570e1f..035d786f3 100755
--- a/core/src/tbox/inc/cygwin/tbox.config.h
+++ b/core/src/tbox/inc/cygwin/tbox.config.h
@@ -185,6 +185,8 @@
/* #undef TB_CONFIG_POSIX_HAVE_PIPE2 */
/* #undef TB_CONFIG_POSIX_HAVE_MKFIFO */
/* #undef TB_CONFIG_POSIX_HAVE_MMAP */
+/* #undef TB_CONFIG_POSIX_HAVE_FUTIMENS */
+/* #undef TB_CONFIG_POSIX_HAVE_UTIMENSAT */
// windows functions
/* #undef TB_CONFIG_WINDOWS_HAVE__INTERLOCKEDEXCHANGE */
diff --git a/core/src/tbox/inc/iphoneos/tbox.config.h b/core/src/tbox/inc/iphoneos/tbox.config.h
index 2545b1625..8bb9ad3aa 100755
--- a/core/src/tbox/inc/iphoneos/tbox.config.h
+++ b/core/src/tbox/inc/iphoneos/tbox.config.h
@@ -189,6 +189,8 @@
/* #undef TB_CONFIG_POSIX_HAVE_PIPE2 */
#define TB_CONFIG_POSIX_HAVE_MKFIFO 1
#define TB_CONFIG_POSIX_HAVE_MMAP 1
+#define TB_CONFIG_POSIX_HAVE_FUTIMENS 1
+#define TB_CONFIG_POSIX_HAVE_UTIMENSAT 1
// windows functions
/* #undef TB_CONFIG_WINDOWS_HAVE__INTERLOCKEDEXCHANGE */
diff --git a/core/src/tbox/inc/linux/tbox.config.h b/core/src/tbox/inc/linux/tbox.config.h
index b5e0faa7f..b2977ecbb 100755
--- a/core/src/tbox/inc/linux/tbox.config.h
+++ b/core/src/tbox/inc/linux/tbox.config.h
@@ -192,6 +192,8 @@
#define TB_CONFIG_POSIX_HAVE_PIPE 1
/* #undef TB_CONFIG_POSIX_HAVE_PIPE2 */
#define TB_CONFIG_POSIX_HAVE_MKFIFO 1
+#define TB_CONFIG_POSIX_HAVE_FUTIMENS 1
+#define TB_CONFIG_POSIX_HAVE_UTIMENSAT 1
// bsd functions
#define TB_CONFIG_BSD_HAVE_FLOCK 1
diff --git a/core/src/tbox/inc/macosx/tbox.config.h b/core/src/tbox/inc/macosx/tbox.config.h
index c1e9c7454..261b82b29 100755
--- a/core/src/tbox/inc/macosx/tbox.config.h
+++ b/core/src/tbox/inc/macosx/tbox.config.h
@@ -184,6 +184,8 @@
#define TB_CONFIG_POSIX_HAVE_PIPE 1
/* #undef TB_CONFIG_POSIX_HAVE_PIPE2 */
#define TB_CONFIG_POSIX_HAVE_MKFIFO 1
+#define TB_CONFIG_POSIX_HAVE_FUTIMENS 1
+#define TB_CONFIG_POSIX_HAVE_UTIMENSAT 1
// bsd functions
#define TB_CONFIG_BSD_HAVE_FLOCK 1
diff --git a/core/src/tbox/inc/mingw/tbox.config.h b/core/src/tbox/inc/mingw/tbox.config.h
index fea570e1f..035d786f3 100755
--- a/core/src/tbox/inc/mingw/tbox.config.h
+++ b/core/src/tbox/inc/mingw/tbox.config.h
@@ -185,6 +185,8 @@
/* #undef TB_CONFIG_POSIX_HAVE_PIPE2 */
/* #undef TB_CONFIG_POSIX_HAVE_MKFIFO */
/* #undef TB_CONFIG_POSIX_HAVE_MMAP */
+/* #undef TB_CONFIG_POSIX_HAVE_FUTIMENS */
+/* #undef TB_CONFIG_POSIX_HAVE_UTIMENSAT */
// windows functions
/* #undef TB_CONFIG_WINDOWS_HAVE__INTERLOCKEDEXCHANGE */
diff --git a/core/src/tbox/inc/msys/tbox.config.h b/core/src/tbox/inc/msys/tbox.config.h
index fea570e1f..035d786f3 100755
--- a/core/src/tbox/inc/msys/tbox.config.h
+++ b/core/src/tbox/inc/msys/tbox.config.h
@@ -185,6 +185,8 @@
/* #undef TB_CONFIG_POSIX_HAVE_PIPE2 */
/* #undef TB_CONFIG_POSIX_HAVE_MKFIFO */
/* #undef TB_CONFIG_POSIX_HAVE_MMAP */
+/* #undef TB_CONFIG_POSIX_HAVE_FUTIMENS */
+/* #undef TB_CONFIG_POSIX_HAVE_UTIMENSAT */
// windows functions
/* #undef TB_CONFIG_WINDOWS_HAVE__INTERLOCKEDEXCHANGE */
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index fff5c8408..aec706e55 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -559,6 +559,7 @@ end
-- we will do not change it if atime/mtime is zero
function os.touch(filepath, opt)
opt = opt or {}
+ opt.mtime = os.time()
if not os._touch(filepath, opt.atime or 0, opt.mtime or 0) then
return false, string.format("cannot touch %s, %s", filepath, os.strerror())
end