- no getdents on OSF1
authorAndrew Tridgell <tridge@samba.org>
Wed, 7 Oct 1998 05:58:09 +0000 (05:58 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 7 Oct 1998 05:58:09 +0000 (05:58 +0000)
- try a new method of handling prototype mismatches in wrapped.c. We
  now try to disable prototypes!

source/configure
source/configure.in
source/include/config.h.in
source/smbwrapper/wrapped.c
source/smbwrapper/wrapper.h

index adeda77b41fdfca0c9177e37567551703713e87c..028fd7bdb989cd09f9a1d9c70c2d4b7bafe95098 100755 (executable)
@@ -1940,7 +1940,7 @@ else
 fi
 done
 
-for ac_hdr in sys/acl.h
+for ac_hdr in sys/acl.h sys/cdefs.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -4352,7 +4352,7 @@ else
 fi
 done
 
-for ac_func in _getdents __getdents _lseek __lseek _read __read
+for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 echo "configure:4359: checking for $ac_func" >&5
index 4f549bcf1dbd0056cdf1181a47914b0c726fa842..276e3847b88732291408b9ea2c4152d0241cf018 100644 (file)
@@ -62,7 +62,7 @@ AC_CHECK_HEADERS(sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h)
 AC_CHECK_HEADERS(shadow.h netinet/tcp.h sys/security.h security/pam_appl.h)
 AC_CHECK_HEADERS(stropts.h poll.h readline.h history.h readline/readline.h)
 AC_CHECK_HEADERS(readline/history.h sys/capability.h sysacll.h sys/syscall.h)
-AC_CHECK_HEADERS(sys/acl.h)
+AC_CHECK_HEADERS(sys/acl.h sys/cdefs.h)
 
 AC_CHECK_SIZEOF(int,cross)
 AC_CHECK_SIZEOF(long,cross)
@@ -194,7 +194,7 @@ AC_CHECK_FUNCS(__xstat __fxstat __lxstat)
 AC_CHECK_FUNCS(_stat _lstat _fstat __stat __lstat __fstat)
 AC_CHECK_FUNCS(_acl __acl _facl __facl _open __open _chdir __chdir)
 AC_CHECK_FUNCS(_close __close _fchdir __fchdir _fcntl __fcntl)
-AC_CHECK_FUNCS(_getdents __getdents _lseek __lseek _read __read)
+AC_CHECK_FUNCS(getdents _getdents __getdents _lseek __lseek _read __read)
 AC_CHECK_FUNCS(_write __write _fork __fork)
 AC_CHECK_FUNCS(_stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64)
 AC_CHECK_FUNCS(llseek _llseek __llseek readdir64 _readdir64 __readdir64)
index 92056f075af465c845ac949dd4e280a4c50885f0..289f06f0a2346ece5c81586ba18a1100fefad16b 100644 (file)
 /* Define if you have the getcwd function.  */
 #undef HAVE_GETCWD
 
+/* Define if you have the getdents function.  */
+#undef HAVE_GETDENTS
+
 /* Define if you have the getgrnam function.  */
 #undef HAVE_GETGRNAM
 
 /* Define if you have the <sys/capability.h> header file.  */
 #undef HAVE_SYS_CAPABILITY_H
 
+/* Define if you have the <sys/cdefs.h> header file.  */
+#undef HAVE_SYS_CDEFS_H
+
 /* Define if you have the <sys/dir.h> header file.  */
 #undef HAVE_SYS_DIR_H
 
index 10b22b35dd4438b9c55c9957a1c8fb788e958023..cf132b31e309afc4b796f597a72c784e7f9e8141 100644 (file)
 */
 
 
+/* we don't want prototypes for this code */
+#define NO_PROTO
+
 #include "wrapper.h"
 
- int open(const char *name, int flags, ...)
+ int open(const char *name, int flags, mode_t mode)
 {
-       va_list ap;
-       mode_t mode;
-
-       va_start(ap, flags);
-       mode = va_arg(ap, mode_t);
-       va_end(ap);
-
        if (smbw_path(name)) {
                return smbw_open(name, flags, mode);
        }
 }
 
 #ifdef HAVE__OPEN
- int _open(const char *name, int flags, ...
+ int _open(const char *name, int flags, mode_t mode
 {
-       va_list ap;
-       mode_t mode;
-
-       va_start(ap, flags);
-       mode = va_arg(ap, mode_t);
-       va_end(ap);
-
        return open(name, flags, mode);
 }
 #elif HAVE___OPEN
- int __open(const char *name, int flags, ...
+ int __open(const char *name, int flags, mode_t mode
 {
-       va_list ap;
-       mode_t mode;
-
-       va_start(ap, flags);
-       mode = va_arg(ap, mode_t);
-       va_end(ap);
-
        return open(name, flags, mode);
 }
 #endif
 #endif
 
 
- int fcntl(int fd, int cmd, ...)
+ int fcntl(int fd, int cmd, long arg)
 {
-       va_list ap;
-       long arg;
-       va_start(ap, cmd);
-       arg = va_arg(ap, long);
-       va_end(ap);
-
        if (smbw_fd(fd)) {
                return smbw_fcntl(fd, cmd, arg);
        }
 
 
 #ifdef HAVE___FCNTL
- int __fcntl(int fd, int cmd, ...)
+ int __fcntl(int fd, int cmd, long arg)
 {
-       va_list ap;
-       long arg;
-       va_start(ap, cmd);
-       arg = va_arg(ap, long);
-       va_end(ap);
-
        return fcntl(fd, cmd, arg);
 }
 #elif HAVE__FCNTL
- int _fcntl(int fd, int cmd, ...)
+ int _fcntl(int fd, int cmd, long arg)
 {
-       va_list ap;
-       long arg;
-       va_start(ap, cmd);
-       arg = va_arg(ap, long);
-       va_end(ap);
-
        return fcntl(fd, cmd, arg);
 }
 #endif
 
 
 
+#ifdef HAVE_GETDENTS
  int getdents(int fd, struct dirent *dirp, unsigned int count)
 {
        if (smbw_fd(fd)) {
 
        return real_getdents(fd, dirp, count);
 }
+#endif
 
 #ifdef HAVE___GETDENTS
  int __getdents(int fd, struct dirent *dirp, unsigned int count)
 #endif
 
 #ifdef HAVE_UTIMES
-#if LINUX
- /* glibc2 gets the prototype wrong */
- int utimes(const char *name,struct timeval tvp[2])
-#else
  int utimes(const char *name,const struct timeval tvp[2])
-#endif
 {
        if (smbw_path(name)) {
                return smbw_utimes(name, tvp);
index 25694bd78c10939fb30fc2c19e8bea1f6a3c9261..3e7d754c9ba1757dc151327c46301f2d9bdc0d4f 100644 (file)
 
 #include "config.h"
 
+#ifdef NO_PROTO
+/* get rid of prototypes */
+#define _NO_PROTO
+
+#ifdef HAVE_SYS_CDEFS_H
+#include <sys/cdefs.h>
+#ifdef __P
+#undef __P
+#define __P(x) ()
+#endif
+#endif
+#endif
+
+
 #ifdef HAVE_SYSCALL_H
 #include <syscall.h>
 #elif HAVE_SYS_SYSCALL_H