[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Wed Apr 4 20:12:04 MDT 2012
The branch, master has been updated
via 52113b3 build: Add configure summary checking to waf build
via ebe2e86 build: Fix bitrotted configure summary, we now also test HAVE_IFACE_GETIFADDRS
via a5fcce0 build: Restore configure summary checking
via 0732311 build: Add more assertions that fcntl locking works 64-bit
via 22d9450 build: Remove unused GLIBC_HACK_FCNTL64
via bd534bd build: Fix sys_open() removal by including system/filesys.h
via 1ac7f07 build: Remove SMB_F* locking defines
via 6098f8d build: Remove SMB_STRUCT_FLOCK define
via f6e0532 build: Remove SMB_STRUCT_DIR define
via 2320b21 build: Remove SMB_STRUCT_DIRENT define
via 6edd8e9 build: Remove sys_rewinddir wrapper
via 3e8a6e5 build: Remove sys_closedir wrapper
via ecc822f build: Remove sys_telldir wrapper
via 900473a build: Remove sys_seekdir wrapper
via afdb780 build: Remove sys_readdir wrapper
via fe526bb build: Remove sys_opendir wrapper
via b74fe73 build: Remove sys_fopen wrapper
via d166b79 build: Remove sys_open wrapper
via 9cc056e build: Remove sys_creat wrapper
via ced1f61 build: Remove fallback call to sys_open as HAVE_CREAT is not actually checked for
via 7fa1b87 build: Remove sys_ftell wrapper
via 43e9be8 build: Remove sys_lseek wrapper
via 5c89d12 build: Remove sys_ftruncate wrapper
via e1b7a5c build: combine off_t 64 bit and largefile test
via a329c72 vfs: Remove -D_LARGEFILE64_SOURCE from vfs examples Makefile
via 96108ee build: #ifdef LARGE_SMB_OFF_T as off_t is now always 64 bits
via 214a668 Remove off64_t declarations
via 694d81a build: Fix configure test that was declaring an off64_t
via 473b974 build: do not use HAVE_EXPLICIT_LARGEFILE_SUPPORT and *64() fucntions any more
via b4e5811 build: Remove configure tests for *64 functions and types
via d5c7de8 build: Require 64-bit files support and do not define HAVE_EXPLICIT_LARGEFILE_SUPPORT
via c03398e build: Add getconf LFS_CFLAGS support to waf build
via db1f277 build: use only standard _FILE_OFFSET_BITS=64 macro for large files
via 813d311 lib/replace: Add getconf LFS_CFLAGS support to autoconf build
from 704ea47 Third part of fix for bug #8837 - smbd crashes when deleting directory and veto files are enabled.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 52113b3bd25b12c766985be7abd042d984c924e6
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Apr 5 10:36:55 2012 +1000
build: Add configure summary checking to waf build
When we remove the autoconf build, this can be re-expressed in python, but
for now it is good to share this double-check.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet at samba.org>
Autobuild-Date: Thu Apr 5 04:11:45 CEST 2012 on sn-devel-104
commit ebe2e862ba9ff4ae1e376d877e428a87be3694e3
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Apr 5 10:26:29 2012 +1000
build: Fix bitrotted configure summary, we now also test HAVE_IFACE_GETIFADDRS
commit a5fcce05b6798a4b76feabe7017d99e72bd16ad0
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Apr 5 10:21:09 2012 +1000
build: Restore configure summary checking
This was accidentily lost in:
commit b1ce226af8b61ad7e3c37860a59c6715012e738b
Author: James Peach <jpeach at samba.org>
Date: Fri Jun 15 21:58:49 2007 +0000
r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
(This used to be commit 171dc060e2a576d724eed1ca65636bdafffd7713)
commit 0732311c805d83b06ccd6c56512723c50b5c83d6
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Apr 5 09:59:41 2012 +1000
build: Add more assertions that fcntl locking works 64-bit
commit 22d9450100fd33ef3cc1fcb0fb92a1a20da5be75
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:53:37 2012 +1100
build: Remove unused GLIBC_HACK_FCNTL64
This is not set from anywhere, and refers to Red Hat 7.0, which is
really, really old now.
Andrew Bartlett
commit bd534bd522830e8855a28456ad7079ceb578fcfc
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:48:01 2012 +1100
build: Fix sys_open() removal by including system/filesys.h
commit 1ac7f071ce2191599b99eddfb4fb595d2d1f474f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:32:54 2012 +1100
build: Remove SMB_F* locking defines
commit 6098f8d80cb37fba7d2f245ee1a5c184b0f27aea
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:26:34 2012 +1100
build: Remove SMB_STRUCT_FLOCK define
commit f6e053202481631b12d75f6a552ee1aa8b355064
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:22:03 2012 +1100
build: Remove SMB_STRUCT_DIR define
commit 2320b2144fcb1236c082278444e3c6df998e17ec
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:18:14 2012 +1100
build: Remove SMB_STRUCT_DIRENT define
commit 6edd8e95f1ed0ac398c84e4050357097087ae15f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:09:39 2012 +1100
build: Remove sys_rewinddir wrapper
commit 3e8a6e576007892bab7d59367c5199a41fb1506d
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:08:27 2012 +1100
build: Remove sys_closedir wrapper
commit ecc822faf8f1e2f34573aabef381a846b08afeec
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:05:21 2012 +1100
build: Remove sys_telldir wrapper
commit 900473a45b90c44e5f301feae42f821214228e27
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:04:03 2012 +1100
build: Remove sys_seekdir wrapper
commit afdb78075c29774c550625e1115ffb7eaf6e015a
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:03:00 2012 +1100
build: Remove sys_readdir wrapper
commit fe526bb32b7d65be10a05d2525b36f004215b003
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 13:01:19 2012 +1100
build: Remove sys_opendir wrapper
commit b74fe73a6fb5862121235f18bc1dfe538e6ceaed
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 12:51:17 2012 +1100
build: Remove sys_fopen wrapper
commit d166b798529dab4538054d0b68797c0cc17f34de
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 12:48:00 2012 +1100
build: Remove sys_open wrapper
commit 9cc056e567fe923bb3a19fce3828cdbea9a3d2f7
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 12:45:06 2012 +1100
build: Remove sys_creat wrapper
commit ced1f61ec12e752045c3c3611f5bf0816a1458e5
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 12:41:41 2012 +1100
build: Remove fallback call to sys_open as HAVE_CREAT is not actually checked for
commit 7fa1b878c1b856d732b08cfefaa1425c0cff158b
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 12:38:31 2012 +1100
build: Remove sys_ftell wrapper
commit 43e9be8894a2eaf883453de78acbade7b391a53e
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 12:37:04 2012 +1100
build: Remove sys_lseek wrapper
commit 5c89d12ca43e7949ace93c75ce59ca9fc0606521
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 12:35:09 2012 +1100
build: Remove sys_ftruncate wrapper
commit e1b7a5c750cf1dc09d7e14909234c7079ee9fabf
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 10:56:54 2012 +1100
build: combine off_t 64 bit and largefile test
commit a329c72f0718d593d1215924814a8bd2b5df4a77
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 10:40:02 2012 +1100
vfs: Remove -D_LARGEFILE64_SOURCE from vfs examples Makefile
commit 96108eed100e1962c4abd75a021d84467ae4d690
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 10:21:22 2012 +1100
build: #ifdef LARGE_SMB_OFF_T as off_t is now always 64 bits
commit 214a668ff3b189f6b55bd97a12177baf46bd1585
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 10:03:24 2012 +1100
Remove off64_t declarations
commit 694d81a7b50657ed7599c90bc666ce47b6d8b9ec
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 10:01:52 2012 +1100
build: Fix configure test that was declaring an off64_t
commit 473b974a06b209a2c2560d6611ea40498a2c97d5
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 09:49:48 2012 +1100
build: do not use HAVE_EXPLICIT_LARGEFILE_SUPPORT and *64() fucntions any more
commit b4e58111b9ee66ed279eaf88ee8ec523a17220f1
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 09:39:57 2012 +1100
build: Remove configure tests for *64 functions and types
We now use the standard types only.
Andrew Bartlett
commit d5c7de8650ee2e05de591f3901c2cad010b88b77
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 09:47:53 2012 +1100
build: Require 64-bit files support and do not define HAVE_EXPLICIT_LARGEFILE_SUPPORT
commit c03398ec0f499eef8981274019cc7b4db09415c2
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Apr 5 08:25:13 2012 +1000
build: Add getconf LFS_CFLAGS support to waf build
commit db1f2779791d250a01e2405a2f901bab4ade4efd
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 28 09:34:12 2012 +1100
build: use only standard _FILE_OFFSET_BITS=64 macro for large files
(We also already use any other macro as set by getconf LFS_CFLAGS, and
the standard AC_SYS_LARGEFILE macro in libreplace).
This is instead of using the transitional *64 posix largefile API
Andrew Bartlett
commit 813d31183dfba7ac702e93b26640ce4d5d0d9918
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Apr 5 08:25:32 2012 +1000
lib/replace: Add getconf LFS_CFLAGS support to autoconf build
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_conftests.py | 20 +-
buildtools/wafsamba/wscript | 3 +-
examples/VFS/skel_opaque.c | 18 +-
examples/VFS/skel_transparent.c | 18 +-
examples/libsmbclient/Makefile | 2 +-
lib/replace/libreplace_cc.m4 | 8 +
lib/util/become_daemon.c | 2 +-
lib/util/fsusage.c | 7 +-
lib/util/wscript_configure | 5 -
libgpo/gpext/gpext.c | 14 +-
source3/client/client.c | 16 +-
source3/client/clitar.c | 4 +-
source3/configure.in | 537 ++------------------------
source3/include/includes.h | 107 +-----
source3/include/proto.h | 23 +-
source3/include/smb.h | 4 -
source3/include/vfs.h | 36 +-
source3/lib/dbwrap/dbwrap_file.c | 8 +-
source3/lib/pidfile.c | 8 +-
source3/lib/popt_common.c | 2 +-
source3/lib/recvfile.c | 2 +-
source3/lib/sendfile.c | 12 -
source3/lib/smbconf/testsuite.c | 2 +-
source3/lib/smbrun.c | 2 +-
source3/lib/system.c | 274 ++------------
source3/lib/util.c | 12 +-
source3/libgpo/gpo_filesync.c | 2 +-
source3/locking/posix.c | 29 +-
source3/modules/onefs.h | 18 +-
source3/modules/onefs_dir.c | 52 ++--
source3/modules/onefs_streams.c | 4 +-
source3/modules/vfs_audit.c | 4 +-
source3/modules/vfs_cap.c | 16 +-
source3/modules/vfs_catia.c | 4 +-
source3/modules/vfs_crossrename.c | 6 +-
source3/modules/vfs_default.c | 48 ++--
source3/modules/vfs_dirsort.c | 26 +-
source3/modules/vfs_extd_audit.c | 4 +-
source3/modules/vfs_full_audit.c | 24 +-
source3/modules/vfs_netatalk.c | 18 +-
source3/modules/vfs_onefs_shadow_copy.c | 4 +-
source3/modules/vfs_prealloc.c | 2 +-
source3/modules/vfs_readahead.c | 2 +-
source3/modules/vfs_scannedonly.c | 40 +-
source3/modules/vfs_shadow_copy.c | 38 +-
source3/modules/vfs_shadow_copy2.c | 8 +-
source3/modules/vfs_streams_depot.c | 2 +-
source3/modules/vfs_time_audit.c | 24 +-
source3/param/loadparm.c | 22 +-
source3/passdb/pdb_smbpasswd.c | 24 +-
source3/rpc_server/samr/srv_samr_chgpasswd.c | 14 +-
source3/smbd/dir.c | 2 +-
source3/smbd/msdfs.c | 4 +-
source3/smbd/oplock_irix.c | 2 +-
source3/smbd/process.c | 4 +-
source3/smbd/quotas.c | 6 +-
source3/smbd/reply.c | 53 ---
source3/smbd/trans2.c | 29 --
source3/smbd/vfs.c | 22 +-
source3/torture/cmd_vfs.c | 2 +-
source3/utils/net_usershare.c | 38 +-
source3/web/neg_lang.c | 5 +-
source3/web/swat.c | 2 +-
source3/wscript | 186 ++--------
tests/fcntl_lock.c | 19 +-
tests/fcntl_lock64.c | 96 -----
tests/summary.c | 7 +-
wscript | 7 +
68 files changed, 472 insertions(+), 1593 deletions(-)
delete mode 100644 tests/fcntl_lock64.c
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index d53d7a8..1838b57 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -18,11 +18,29 @@ def CHECK_ICONV(conf, define='HAVE_NATIVE_ICONV'):
@conf
def CHECK_LARGEFILE(conf, define='HAVE_LARGEFILE'):
'''see what we need for largefile support'''
+ getconf_cflags = conf.CHECK_COMMAND(['getconf', 'LFS_CFLAGS']);
+ if getconf_cflags is not False:
+ if (conf.CHECK_CODE('return !(sizeof(off_t) >= 8)',
+ define='WORKING_GETCONF_LFS_CFLAGS',
+ execute=True,
+ cflags=getconf_cflags,
+ msg='Checking getconf large file support flags work')):
+ conf.ADD_CFLAGS(getconf_cflags)
+ getconf_cflags_list=TO_LIST(getconf_cflags)
+ for flag in getconf_cflags_list:
+ if flag[:2] == "-D":
+ flag_split = flag[2:].split('=')
+ if len(flag_split) == 1:
+ conf.DEFINE(flag_split[0], '1')
+ else:
+ conf.DEFINE(flag_split[0], flag_split[1])
+
if conf.CHECK_CODE('return !(sizeof(off_t) >= 8)',
define,
execute=True,
- msg='Checking for large file support'):
+ msg='Checking for large file support without additional flags'):
return True
+
if conf.CHECK_CODE('return !(sizeof(off_t) >= 8)',
define,
execute=True,
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 49d2107..a302280 100755
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -362,7 +362,8 @@ def configure(conf):
conf.CHECK_HEADERS('limits.h assert.h')
# see if we need special largefile flags
- conf.CHECK_LARGEFILE()
+ if not conf.CHECK_LARGEFILE():
+ raise Utils.WafError('Samba requires large file support support, but not available on this platform: sizeof(off_t) < 8')
if 'HAVE_STDDEF_H' in conf.env and 'HAVE_STDLIB_H' in conf.env:
conf.DEFINE('STDC_HEADERS', 1)
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 5c97e23..426e7b7 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -89,34 +89,34 @@ static NTSTATUS skel_get_dfs_referrals(struct vfs_handle_struct *handle,
return NT_STATUS_NOT_IMPLEMENTED;
}
-static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
return NULL;
}
-static SMB_STRUCT_DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
+static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
{
return NULL;
}
-static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
+static struct dirent *skel_readdir(vfs_handle_struct *handle,
+ DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
return NULL;
}
-static void skel_seekdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset)
+static void skel_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
{
;
}
-static long skel_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static long skel_telldir(vfs_handle_struct *handle, DIR *dirp)
{
return (long)-1;
}
-static void skel_rewind_dir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
{
;
}
@@ -133,13 +133,13 @@ static int skel_rmdir(vfs_handle_struct *handle, const char *path)
return -1;
}
-static int skel_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dir)
+static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
{
errno = ENOSYS;
return -1;
}
-static void skel_init_search_op(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static void skel_init_search_op(struct vfs_handle_struct *handle, DIR *dirp)
{
;
}
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index c57545c..f947194 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -86,34 +86,34 @@ static NTSTATUS skel_get_dfs_referrals(struct vfs_handle_struct *handle,
return SMB_VFS_NEXT_GET_DFS_REFERRALS(handle, r);
}
-static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
}
-static SMB_STRUCT_DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
+static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
{
return SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
}
-static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
+static struct dirent *skel_readdir(vfs_handle_struct *handle,
+ DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
return SMB_VFS_NEXT_READDIR(handle, dirp, sbuf);
}
-static void skel_seekdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset)
+static void skel_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
{
SMB_VFS_NEXT_SEEKDIR(handle, dirp, offset);
}
-static long skel_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static long skel_telldir(vfs_handle_struct *handle, DIR *dirp)
{
return SMB_VFS_NEXT_TELLDIR(handle, dirp);
}
-static void skel_rewind_dir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
{
SMB_VFS_NEXT_REWINDDIR(handle, dirp);
}
@@ -128,12 +128,12 @@ static int skel_rmdir(vfs_handle_struct *handle, const char *path)
return SMB_VFS_NEXT_RMDIR(handle, path);
}
-static int skel_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dir)
+static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
{
return SMB_VFS_NEXT_CLOSEDIR(handle, dir);
}
-static void skel_init_search_op(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static void skel_init_search_op(struct vfs_handle_struct *handle, DIR *dirp)
{
SMB_VFS_NEXT_INIT_SEARCH_OP(handle, dirp);
}
diff --git a/examples/libsmbclient/Makefile b/examples/libsmbclient/Makefile
index 728dbe0..08ff19a 100644
--- a/examples/libsmbclient/Makefile
+++ b/examples/libsmbclient/Makefile
@@ -7,7 +7,7 @@ EXTLIB_INCL = -I/usr/include/gtk-1.2 \
-I/usr/lib/glib/include
EXTLIB_INCL = `gtk-config --cflags`
-DEFS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+DEFS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
CFLAGS = -O0 -g $(SAMBA_INCL) $(EXTLIB_INCL) $(DEFS)
LDFLAGS = -L/usr/local/samba/lib \
diff --git a/lib/replace/libreplace_cc.m4 b/lib/replace/libreplace_cc.m4
index 7ddc19f..c755047 100644
--- a/lib/replace/libreplace_cc.m4
+++ b/lib/replace/libreplace_cc.m4
@@ -50,6 +50,14 @@ AC_PROG_INSTALL
AC_ISC_POSIX
AC_N_DEFINE(_XOPEN_SOURCE_EXTENDED)
+AC_MSG_CHECKING(checking getconf LFS_CFLAGS for large file support flags)
+LFS_CFLAGS=`(getconf LFS_CFLAGS) 2>/dev/null` || LFS_CFLAGS=""
+
+AC_MSG_RESULT(${LFS_CFLAGS})
+if test "x$LFS_CFLAGS" != 'x-1' || test "x$LFS_CFLAGS" != "xundefined"; then
+ CFLAGS="$CFLAGS $LFS_CFLAGS"
+fi
+
AC_SYS_LARGEFILE
dnl Add #include for broken IRIX header files
diff --git a/lib/util/become_daemon.c b/lib/util/become_daemon.c
index 92a7586..373927c 100644
--- a/lib/util/become_daemon.c
+++ b/lib/util/become_daemon.c
@@ -85,7 +85,7 @@ _PUBLIC_ void become_daemon(bool do_fork, bool no_process_group, bool log_stdout
if (!no_process_group) setsid();
#elif defined(TIOCNOTTY)
if (!no_process_group) {
- int i = sys_open("/dev/tty", O_RDWR, 0);
+ int i = open("/dev/tty", O_RDWR, 0);
if (i != -1) {
ioctl(i, (int) TIOCNOTTY, (char *)0);
close(i);
diff --git a/lib/util/fsusage.c b/lib/util/fsusage.c
index e5f2678..bf07baf 100644
--- a/lib/util/fsusage.c
+++ b/lib/util/fsusage.c
@@ -128,7 +128,7 @@ _PUBLIC_ int sys_fsusage(const char *path, uint64_t *dfree, uint64_t *dsize)
#endif /* STAT_STATFS4 */
-#if defined(STAT_STATVFS) || defined(STAT_STATVFS64) /* SVR4 */
+#if defined(STAT_STATVFS) /* SVR4 */
#ifdef HAVE_FRSIZE
# define CONVERT_BLOCKS(B) \
adjust_blocks ((uint64_t)(B), fsd.f_frsize ? (uint64_t)fsd.f_frsize : (uint64_t)fsd.f_bsize, (uint64_t)512)
@@ -137,13 +137,8 @@ _PUBLIC_ int sys_fsusage(const char *path, uint64_t *dfree, uint64_t *dsize)
adjust_blocks ((uint64_t)(B), (uint64_t)fsd.f_bsize, (uint64_t)512)
#endif
-#ifdef STAT_STATVFS64
- struct statvfs64 fsd;
- if (statvfs64(path, &fsd) < 0) return -1;
-#else
struct statvfs fsd;
if (statvfs(path, &fsd) < 0) return -1;
-#endif
/* f_frsize isn't guaranteed to be supported. */
diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure
index ad55476..2819927 100644
--- a/lib/util/wscript_configure
+++ b/lib/util/wscript_configure
@@ -26,11 +26,6 @@ conf.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define='HAVE_FRSIZE',
# all the different ways of doing statfs
statfs_types = [
- ( 'STAT_STATVFS64',
- 'Linux statvfs64',
- 'struct statvfs64 fsd; exit(statvfs64 (".", &fsd))',
- 'sys/statvfs.h' ),
-
( 'STAT_STATVFS',
'statvfs (SVR4)',
'struct statvfs fsd; exit(statvfs(0, &fsd))',
diff --git a/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c
index 1f86b5f..8bda729 100644
--- a/libgpo/gpext/gpext.c
+++ b/libgpo/gpext/gpext.c
@@ -487,16 +487,16 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
const char ***ext_list,
size_t *ext_list_len)
{
- SMB_STRUCT_DIR *dir = NULL;
- SMB_STRUCT_DIRENT *dirent = NULL;
+ DIR *dir = NULL;
+ struct dirent *dirent = NULL;
- dir = sys_opendir(modules_path(talloc_tos(),
+ dir = opendir(modules_path(talloc_tos(),
SAMBA_SUBSYSTEM_GPEXT));
if (!dir) {
return map_nt_error_from_unix_common(errno);
}
- while ((dirent = sys_readdir(dir))) {
+ while ((dirent = readdir(dir))) {
fstring name; /* forgive me... */
char *p;
@@ -508,7 +508,7 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
p = strrchr(dirent->d_name, '.');
if (!p) {
- sys_closedir(dir);
+ closedir(dir);
return NT_STATUS_NO_MEMORY;
}
@@ -523,12 +523,12 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
if (!add_string_to_array(mem_ctx, name, ext_list,
(int *)ext_list_len)) {
- sys_closedir(dir);
+ closedir(dir);
return NT_STATUS_NO_MEMORY;
}
}
- sys_closedir(dir);
+ closedir(dir);
return NT_STATUS_OK;
}
diff --git a/source3/client/client.c b/source3/client/client.c
index 0d60103..3bfe8e9 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1108,16 +1108,16 @@ static int do_get(const char *rname, const char *lname_in, bool reget)
handle = fileno(stdout);
} else {
if (reget) {
- handle = sys_open(lname, O_WRONLY|O_CREAT, 0644);
+ handle = open(lname, O_WRONLY|O_CREAT, 0644);
if (handle >= 0) {
- start = sys_lseek(handle, 0, SEEK_END);
+ start = lseek(handle, 0, SEEK_END);
if (start == -1) {
d_printf("Error seeking local file\n");
return 1;
}
}
} else {
- handle = sys_open(lname, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+ handle = open(lname, O_WRONLY|O_CREAT|O_TRUNC, 0644);
}
newhandle = true;
}
@@ -2074,7 +2074,7 @@ static int cmd_select(void)
static int file_find(struct file_list **list, const char *directory,
const char *expression, bool match)
{
- SMB_STRUCT_DIR *dir;
+ DIR *dir;
struct file_list *entry;
struct stat statbuf;
int ret;
@@ -2082,7 +2082,7 @@ static int file_find(struct file_list **list, const char *directory,
bool isdir;
const char *dname;
- dir = sys_opendir(directory);
+ dir = opendir(directory);
if (!dir)
return -1;
@@ -2111,14 +2111,14 @@ static int file_find(struct file_list **list, const char *directory,
if (ret == -1) {
SAFE_FREE(path);
- sys_closedir(dir);
+ closedir(dir);
return -1;
}
}
entry = SMB_MALLOC_P(struct file_list);
if (!entry) {
d_printf("Out of memory in file_find\n");
- sys_closedir(dir);
+ closedir(dir);
return -1;
}
entry->file_path = path;
@@ -2129,7 +2129,7 @@ static int file_find(struct file_list **list, const char *directory,
}
}
- sys_closedir(dir);
+ closedir(dir);
return 0;
}
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index bf18e54..43311c1 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -1968,8 +1968,8 @@ int tar_parseargs(int argc, char *argv[], const char *Optarg, int Optind)
} else {
if (tar_type=='c' && dry_run) {
tarhandle=-1;
- } else if ((tar_type=='x' && (tarhandle = sys_open(argv[Optind], O_RDONLY, 0)) == -1)
- || (tar_type=='c' && (tarhandle=sys_creat(argv[Optind], 0644)) < 0)) {
+ } else if ((tar_type=='x' && (tarhandle = open(argv[Optind], O_RDONLY, 0)) == -1)
+ || (tar_type=='c' && (tarhandle=creat(argv[Optind], 0644)) < 0)) {
DEBUG(0,("Error opening local file %s - %s\n", argv[Optind], strerror(errno)));
return(0);
}
diff --git a/source3/configure.in b/source3/configure.in
index 6828a2e..e278a39 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -475,6 +475,7 @@ if test "x$developer" = xyes; then
default_shared_modules="$default_shared_modules perfcount_test"
fi
+
#
# Config CPPFLAG settings for strange OS's that must be set
# before other tests. Do NOT invoke AC_CHECK_HEADERS within this
@@ -507,51 +508,19 @@ case "$host_os" in
#
*aix4*)
AC_MSG_RESULT([enabling large file support])
- CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
+ CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
AC_DEFINE(_LARGE_FILES, 1, [Whether to enable large file support])
;;
#
# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
# to the existance of large files..
-# Note that -D_LARGEFILE64_SOURCE is different from the Sun
-# recommendations on large file support, however it makes the
-# compile work using gcc 2.7 and 2.8, whereas using the Sun
-# recommendation makes the compile fail on gcc2.7. JRA.
#
# Solaris uses SYSV printing. Make sure to set that here. --jerry
#
*solaris*)
AC_DEFINE(SYSV, 1, [Whether to enable System V compatibility])
- case `uname -r` in
- 5.0|5.0.*|5.1|5.1.*|5.2|5.2.*|5.3|5.3.*|5.5|5.5.*)
- AC_MSG_RESULT([no large file support])
- ;;
- 5.*)
- LDFLAGS="$LDFLAGS -lthread"
- CPPFLAGS="$CPPFLAGS -D_REENTRANT"
- AC_MSG_RESULT([enabling large file support])
- if test "$ac_cv_prog_gcc" = yes; then
- ${CC-cc} -v >conftest.c 2>&1
- ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
- rm -fr conftest.c
- case "$ac_cv_gcc_compiler_version_number" in
- *"gcc version 2.6"*|*"gcc version 2.7"*)
- CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
- AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
- ;;
- *)
- CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
- AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
- AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
- ;;
- esac
- else
- CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
- AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
- AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
- fi
- ;;
- esac
+ LDFLAGS="$LDFLAGS -lthread"
+ CPPFLAGS="$CPPFLAGS -D_REENTRANT"
;;
#
# IRIX uses SYSV printing. Make sure to set that here
@@ -582,97 +551,13 @@ case "$host_os" in
AC_DEFINE(_SYSV, 1, [Whether to enable System V compatibility])
esac
;;
+# GNU systems
#
-# Tests needed for SINIX large file support.
-#
- *sysv4*)
- if test $host = mips-sni-sysv4 ; then
- AC_MSG_CHECKING([for LFS support])
- old_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
- AC_TRY_RUN([
-#include <unistd.h>
-main () {
-#if _LFS64_LARGEFILE == 1
-exit(0);
-#else
-exit(1);
-#endif
-}], [SINIX_LFS_SUPPORT=yes], [SINIX_LFS_SUPPORT=no], [SINIX_LFS_SUPPORT=cross])
- CPPFLAGS="$old_CPPFLAGS"
- if test x$SINIX_LFS_SUPPORT = xyes ; then
- CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
- AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
- CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
- LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
- LIBS="`getconf LFS64_LIBS` $LIBS"
- fi
- AC_MSG_RESULT([$SINIX_LFS_SUPPORT])
- fi
- ;;
-
-# Systems with LFS support.
-#
- gnu* | k*bsd*-gnu | kopensolaris*-gnu)
- CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
- AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
- AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
+ *linux* | *hurd* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
--
Samba Shared Repository
More information about the samba-cvs
mailing list