mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:22:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			145 lines
		
	
	
	
		
			6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			145 lines
		
	
	
	
		
			6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From dc70b3830887eea5f28e3e626b4c4ef492d77ce0 Mon Sep 17 00:00:00 2001
 | |
| From: AnotherTest <ali.mpfard@gmail.com>
 | |
| Date: Thu, 11 Feb 2021 21:40:57 +0330
 | |
| Subject: [PATCH 07/11] utimes->utime
 | |
| 
 | |
| ---
 | |
|  Source/kwsys/CMakeLists.txt                               | 2 +-
 | |
|  Source/kwsys/SystemTools.cxx                              | 4 ++--
 | |
|  Source/kwsys/kwsysPlatformTestsCXX.cxx                    | 2 +-
 | |
|  Utilities/cmlibarchive/CMakeLists.txt                     | 2 +-
 | |
|  Utilities/cmlibarchive/build/cmake/config.h.in            | 2 +-
 | |
|  .../cmlibarchive/libarchive/archive_read_disk_posix.c     | 2 +-
 | |
|  .../cmlibarchive/libarchive/archive_write_disk_posix.c    | 8 ++++----
 | |
|  Utilities/cmlibuv/src/unix/fs.c                           | 2 +-
 | |
|  8 files changed, 12 insertions(+), 12 deletions(-)
 | |
| 
 | |
| diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
 | |
| index 77adae2..52bc809 100644
 | |
| --- a/Source/kwsys/CMakeLists.txt
 | |
| +++ b/Source/kwsys/CMakeLists.txt
 | |
| @@ -431,7 +431,7 @@ if(KWSYS_USE_SystemTools)
 | |
|    KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
 | |
|      "Checking whether CXX compiler has environ in stdlib.h" DIRECT)
 | |
|    KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_UTIMES
 | |
| -    "Checking whether CXX compiler has utimes" DIRECT)
 | |
| +    "Checking whether CXX compiler has utime" DIRECT)
 | |
|    KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_UTIMENSAT
 | |
|      "Checking whether CXX compiler has utimensat" DIRECT)
 | |
|    KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_STAT_HAS_ST_MTIM
 | |
| diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
 | |
| index fbe7ed9..b0c6d5c 100644
 | |
| --- a/Source/kwsys/SystemTools.cxx
 | |
| +++ b/Source/kwsys/SystemTools.cxx
 | |
| @@ -1445,8 +1445,8 @@ bool SystemTools::Touch(const std::string& filename, bool create)
 | |
|      return false;
 | |
|    }
 | |
|  #else
 | |
| -  // fall back to utimes
 | |
| -  if (utimes(filename.c_str(), nullptr) < 0) {
 | |
| +  // fall back to utime
 | |
| +  if (utime(filename.c_str(), nullptr) < 0) {
 | |
|      return false;
 | |
|    }
 | |
|  #endif
 | |
| diff --git a/Source/kwsys/kwsysPlatformTestsCXX.cxx b/Source/kwsys/kwsysPlatformTestsCXX.cxx
 | |
| index 195a461..f5f50b4 100644
 | |
| --- a/Source/kwsys/kwsysPlatformTestsCXX.cxx
 | |
| +++ b/Source/kwsys/kwsysPlatformTestsCXX.cxx
 | |
| @@ -82,7 +82,7 @@ int main()
 | |
|  int main()
 | |
|  {
 | |
|    struct timeval* current_time = 0;
 | |
| -  return utimes("/example", current_time);
 | |
| +  return utime("/example", current_time);
 | |
|  }
 | |
|  #endif
 | |
|  
 | |
| diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
 | |
| index 9d6f9a2..c49043a 100644
 | |
| --- a/Utilities/cmlibarchive/CMakeLists.txt
 | |
| +++ b/Utilities/cmlibarchive/CMakeLists.txt
 | |
| @@ -1411,7 +1411,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(tzset HAVE_TZSET)
 | |
|  CHECK_FUNCTION_EXISTS_GLIBC(unlinkat HAVE_UNLINKAT)
 | |
|  CHECK_FUNCTION_EXISTS_GLIBC(unsetenv HAVE_UNSETENV)
 | |
|  CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME)
 | |
| -CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES)
 | |
| +CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIMES)
 | |
|  CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT)
 | |
|  CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK)
 | |
|  CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB)
 | |
| diff --git a/Utilities/cmlibarchive/build/cmake/config.h.in b/Utilities/cmlibarchive/build/cmake/config.h.in
 | |
| index 4c746b7..2407b94 100644
 | |
| --- a/Utilities/cmlibarchive/build/cmake/config.h.in
 | |
| +++ b/Utilities/cmlibarchive/build/cmake/config.h.in
 | |
| @@ -916,7 +916,7 @@
 | |
|  /* Define to 1 if you have the `utimensat' function. */
 | |
|  #cmakedefine HAVE_UTIMENSAT 1
 | |
|  
 | |
| -/* Define to 1 if you have the `utimes' function. */
 | |
| +/* Define to 1 if you have the `utime' function. */
 | |
|  #cmakedefine HAVE_UTIMES 1
 | |
|  
 | |
|  /* Define to 1 if you have the <utime.h> header file. */
 | |
| diff --git a/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c b/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c
 | |
| index 6dd1fd9..2fa08d4 100644
 | |
| --- a/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c
 | |
| +++ b/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c
 | |
| @@ -2043,7 +2043,7 @@ close_and_restore_time(int fd, struct tree *t, struct restore_time *rt)
 | |
|  #ifdef HAVE_LUTIMES
 | |
|  	if (lutimes(rt->name, times) != 0)
 | |
|  #else
 | |
| -	if (AE_IFLNK != rt->filetype && utimes(rt->name, times) != 0)
 | |
| +	if (AE_IFLNK != rt->filetype && utime(rt->name, times) != 0)
 | |
|  #endif
 | |
|  		return (-1);
 | |
|  #endif
 | |
| diff --git a/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c b/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c
 | |
| index 67da3e1..157e27a 100644
 | |
| --- a/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c
 | |
| +++ b/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c
 | |
| @@ -3365,8 +3365,8 @@ set_time(int fd, int mode, const char *name,
 | |
|  
 | |
|  #elif HAVE_UTIMES
 | |
|  	/*
 | |
| -	 * The utimes()-family functions support µs-resolution and
 | |
| -	 * setting times fds and symlinks.  utimes() is documented as
 | |
| +	 * The utime()-family functions support µs-resolution and
 | |
| +	 * setting times fds and symlinks.  utime() is documented as
 | |
|  	 * LEGACY by POSIX, futimes() and lutimes() are not described
 | |
|  	 * in POSIX.
 | |
|  	 */
 | |
| @@ -3389,7 +3389,7 @@ set_time(int fd, int mode, const char *name,
 | |
|  #else
 | |
|  	if (S_ISLNK(mode))
 | |
|  		return (0);
 | |
| -	return (utimes(name, times));
 | |
| +	return (utime(name, times));
 | |
|  #endif
 | |
|  
 | |
|  #elif defined(HAVE_UTIME)
 | |
| @@ -3477,7 +3477,7 @@ set_times(struct archive_write_disk *a,
 | |
|  #ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME
 | |
|  	/*
 | |
|  	 * If you have struct stat.st_birthtime, we assume BSD
 | |
| -	 * birthtime semantics, in which {f,l,}utimes() updates
 | |
| +	 * birthtime semantics, in which {f,l,}utime() updates
 | |
|  	 * birthtime to earliest mtime.  So we set the time twice,
 | |
|  	 * first using the birthtime, then using the mtime.  If
 | |
|  	 * birthtime == mtime, this isn't necessary, so we skip it.
 | |
| diff --git a/Utilities/cmlibuv/src/unix/fs.c b/Utilities/cmlibuv/src/unix/fs.c
 | |
| index 6d57cee..48c0123 100644
 | |
| --- a/Utilities/cmlibuv/src/unix/fs.c
 | |
| +++ b/Utilities/cmlibuv/src/unix/fs.c
 | |
| @@ -1036,7 +1036,7 @@ static ssize_t uv__fs_utime(uv_fs_t* req) {
 | |
|    struct timeval tv[2];
 | |
|    tv[0] = uv__fs_to_timeval(req->atime);
 | |
|    tv[1] = uv__fs_to_timeval(req->mtime);
 | |
| -  return utimes(req->path, tv);
 | |
| +  return utime(req->path, tv);
 | |
|  #elif defined(_AIX)                                                           \
 | |
|      && !defined(_AIX71)
 | |
|    struct utimbuf buf;
 | |
| -- 
 | |
| 2.30.1
 | |
| 
 | 
