summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/config.m45
-rw-r--r--source4/ntvfs/config.mk25
-rw-r--r--source4/ntvfs/posix/config.m423
-rw-r--r--source4/ntvfs/posix/config.mk23
-rw-r--r--source4/ntvfs/posix/pvfs_fileinfo.c6
5 files changed, 56 insertions, 26 deletions
diff --git a/source4/ntvfs/config.m4 b/source4/ntvfs/config.m4
index f23610fef4..051a6883e2 100644
--- a/source4/ntvfs/config.m4
+++ b/source4/ntvfs/config.m4
@@ -1,5 +1,8 @@
dnl # NTVFS Server subsystem
+SMB_INCLUDE_M4(ntvfs/posix/config.m4)
+SMB_MODULE_MK(ntvfs_posix, NTVFS, STATIC, ntvfs/posix/config.mk)
+
SMB_MODULE_MK(ntvfs_cifs, NTVFS, STATIC, ntvfs/config.mk)
SMB_MODULE_MK(ntvfs_simple, NTVFS, STATIC, ntvfs/config.mk)
@@ -8,8 +11,6 @@ SMB_MODULE_MK(ntvfs_print, NTVFS, STATIC, ntvfs/config.mk)
SMB_MODULE_MK(ntvfs_ipc, NTVFS, STATIC, ntvfs/config.mk)
-SMB_MODULE_MK(ntvfs_posix, NTVFS, STATIC, ntvfs/config.mk)
-
SMB_MODULE_MK(ntvfs_nbench, NTVFS, STATIC, ntvfs/config.mk)
SMB_SUBSYSTEM_MK(NTVFS,ntvfs/config.mk)
diff --git a/source4/ntvfs/config.mk b/source4/ntvfs/config.mk
index cf48cc61c2..d00cc2b1f4 100644
--- a/source4/ntvfs/config.mk
+++ b/source4/ntvfs/config.mk
@@ -35,33 +35,10 @@ INIT_OBJ_FILES = \
ntvfs/ipc/vfs_ipc.o \
ntvfs/ipc/ipc_rap.o \
ntvfs/ipc/rap_server.o
-
# End MODULE ntvfs_ipc
################################################
-################################################
-# Start MODULE ntvfs_posix
-[MODULE::ntvfs_posix]
-INIT_OBJ_FILES = \
- ntvfs/posix/vfs_posix.o
-ADD_OBJ_FILES = \
- ntvfs/posix/pvfs_util.o \
- ntvfs/posix/pvfs_search.o \
- ntvfs/posix/pvfs_dirlist.o \
- ntvfs/posix/pvfs_fileinfo.o \
- ntvfs/posix/pvfs_unlink.o \
- ntvfs/posix/pvfs_mkdir.o \
- ntvfs/posix/pvfs_open.o \
- ntvfs/posix/pvfs_read.o \
- ntvfs/posix/pvfs_write.o \
- ntvfs/posix/pvfs_fsinfo.o \
- ntvfs/posix/pvfs_qfileinfo.o \
- ntvfs/posix/pvfs_setfileinfo.o \
- ntvfs/posix/pvfs_rename.o \
- ntvfs/posix/pvfs_resolve.o \
- ntvfs/posix/pvfs_shortname.o
-# End MODULE ntvfs_posix
-################################################
+
################################################
# Start MODULE ntvfs_nbench
diff --git a/source4/ntvfs/posix/config.m4 b/source4/ntvfs/posix/config.m4
new file mode 100644
index 0000000000..d8a2e3ec36
--- /dev/null
+++ b/source4/ntvfs/posix/config.m4
@@ -0,0 +1,23 @@
+SMB_MODULE_MK(ntvfs_posix, NTVFS, STATIC, ntvfs/config.mk)
+
+
+dnl #############################################
+dnl see if we have nanosecond resolution for stat
+AC_CACHE_CHECK([for tv_nsec nanosecond fields in struct stat],ac_cv_have_stat_tv_nsec,[
+AC_TRY_COMPILE(
+[
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+],
+[struct stat st;
+ st.st_mtim.tv_nsec;
+ st.st_atim.tv_nsec;
+ st.st_ctim.tv_nsec;
+],
+ac_cv_decl_have_stat_tv_nsec=yes,
+ac_cv_decl_have_stat_tv_nsec=no)
+])
+if test x"$ac_cv_decl_have_stat_tv_nsec" = x"yes"; then
+ AC_DEFINE(HAVE_STAT_TV_NSEC,1,[Whether stat has tv_nsec nanosecond fields])
+fi
diff --git a/source4/ntvfs/posix/config.mk b/source4/ntvfs/posix/config.mk
new file mode 100644
index 0000000000..ad4c754ca7
--- /dev/null
+++ b/source4/ntvfs/posix/config.mk
@@ -0,0 +1,23 @@
+################################################
+# Start MODULE ntvfs_posix
+[MODULE::ntvfs_posix]
+INIT_OBJ_FILES = \
+ ntvfs/posix/vfs_posix.o
+ADD_OBJ_FILES = \
+ ntvfs/posix/pvfs_util.o \
+ ntvfs/posix/pvfs_search.o \
+ ntvfs/posix/pvfs_dirlist.o \
+ ntvfs/posix/pvfs_fileinfo.o \
+ ntvfs/posix/pvfs_unlink.o \
+ ntvfs/posix/pvfs_mkdir.o \
+ ntvfs/posix/pvfs_open.o \
+ ntvfs/posix/pvfs_read.o \
+ ntvfs/posix/pvfs_write.o \
+ ntvfs/posix/pvfs_fsinfo.o \
+ ntvfs/posix/pvfs_qfileinfo.o \
+ ntvfs/posix/pvfs_setfileinfo.o \
+ ntvfs/posix/pvfs_rename.o \
+ ntvfs/posix/pvfs_resolve.o \
+ ntvfs/posix/pvfs_shortname.o
+# End MODULE ntvfs_posix
+################################################
diff --git a/source4/ntvfs/posix/pvfs_fileinfo.c b/source4/ntvfs/posix/pvfs_fileinfo.c
index be559cf179..77eb10422d 100644
--- a/source4/ntvfs/posix/pvfs_fileinfo.c
+++ b/source4/ntvfs/posix/pvfs_fileinfo.c
@@ -139,6 +139,12 @@ NTSTATUS pvfs_fill_dos_info(struct pvfs_state *pvfs, struct pvfs_filename *name)
unix_to_nt_time(&name->dos.access_time, name->st.st_atime);
unix_to_nt_time(&name->dos.write_time, name->st.st_mtime);
unix_to_nt_time(&name->dos.change_time, name->st.st_mtime);
+#ifdef HAVE_STAT_TV_NSEC
+ name->dos.create_time += name->st.st_ctim.tv_nsec / 100;
+ name->dos.access_time += name->st.st_atim.tv_nsec / 100;
+ name->dos.write_time += name->st.st_mtim.tv_nsec / 100;
+ name->dos.change_time += name->st.st_mtim.tv_nsec / 100;
+#endif
name->dos.attrib = dos_mode_from_stat(pvfs, &name->st);
name->dos.alloc_size = name->st.st_size;
name->dos.nlink = name->st.st_nlink;