Просмотр исходного кода

* configure.in: Add check for lutimes(2). Mac OS X doesn't provide this.
* support/sys-time.c: lutimes(2) only exists on some BSDs. There's a
configure check for it now -- use it.

svn path=/trunk/mono/; revision=55015

Jonathan Pryor 20 лет назад
Родитель
Сommit
b4bddc0ee4
4 измененных файлов с 13 добавлено и 1 удалено
  1. 4 0
      ChangeLog
  2. 1 0
      configure.in
  3. 5 0
      support/ChangeLog
  4. 3 1
      support/sys-time.c

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+2006-01-03  Jonathan Pryor  <[email protected]>
+
+	* configure.in: Add check for lutimes(2).  Mac OS X doesn't provide this.
+
 2005-12-28  Kornél Pál  <[email protected]>
 
 	* runtime/Makefile.am (all-local): Enclose CC by apostrophes to fix

+ 1 - 0
configure.in

@@ -1209,6 +1209,7 @@ if test x$platform_win32 = xno; then
 	AC_CHECK_FUNCS(fgetpwent)
 	AC_CHECK_FUNCS(fgetpwent)
 	AC_CHECK_FUNCS(getfsstat)
+	AC_CHECK_FUNCS(lutimes)
 	AC_CHECK_FUNCS(mremap)
 	AC_CHECK_FUNCS(remap_file_pages)
 	AC_CHECK_FUNCS(posix_fadvise)

+ 5 - 0
support/ChangeLog

@@ -1,3 +1,8 @@
+2006-01-03  Jonathan Pryor  <[email protected]>
+
+	* sys-time.c: lutimes(2) only exists on some BSDs.  There's a configure
+	  check for it now -- use it.
+
 2005-12-28  Jonathan Pryor  <[email protected]>
 
 	* map-icalls.h: Flush (add utimes_bad, lutimes, futimes).

+ 3 - 1
support/sys-time.c

@@ -4,7 +4,7 @@
  * Authors:
  *   Jonathan Pryor ([email protected])
  *
- * Copyright (C) 2004 Jonathan Pryor
+ * Copyright (C) 2004-2006 Jonathan Pryor
  */
 
 #include <sys/types.h>
@@ -121,6 +121,7 @@ Mono_Posix_Syscall_utimes(const char *filename, struct Mono_Posix_Timeval *tv)
 	return utimes (filename, ptv);
 }
 
+#ifdef HAVE_LUTIMES
 gint32
 Mono_Posix_Syscall_lutimes(const char *filename, struct Mono_Posix_Timeval *tv)
 {
@@ -131,6 +132,7 @@ Mono_Posix_Syscall_lutimes(const char *filename, struct Mono_Posix_Timeval *tv)
 
 	return lutimes (filename, ptv);
 }
+#endif /* def HAVE_LUTIMES */
 
 gint32
 Mono_Posix_Syscall_futimes(int fd, struct Mono_Posix_Timeval *tv)