It looks like something got broken in openbsd-compat/bsd-snprintf.c ... gcc -g -O2 -Wall -Dftruncate=chsize -I/usr/local/include -I/usr/local/ssl/includ e -I. -I.. -I../src/openbsd-compat -I../src/openbsd-compat/.. -DHAVE_CONFIG_H -c ../src/openbsd-compat/bsd-snprintf.c In file included from ../src/openbsd-compat/bsd-snprintf.c:72: /usr/local/lib/gcc-lib/i486-unknown-sco3.2v4.2/2.7.2.1/include/varargs.h:88: war ning: `va_start' redefined /usr/local/lib/gcc-lib/i486-unknown-sco3.2v4.2/2.7.2.1/include/stdarg.h:72: warn ing: this is the location of the previous definition ./src/openbsd-compat/bsd-snprintf.c: In function `snprintf': ./src/openbsd-compat/bsd-snprintf.c:725: argument `__builtin_va_alist' doesn't match prototype ./src/openbsd-compat/bsd-snprintf.h:11: prototype declaration ./src/openbsd-compat/bsd-snprintf.c:725: number of arguments doesn't match prot otype ./src/openbsd-compat/bsd-snprintf.h:11: prototype declaration gmake[1]: *** [bsd-snprintf.o] Error 1 gmake[1]: Leaving directory `/usr2/src/networking/openssh/openbsd-compat' gmake: *** [openbsd-compat/libopenbsd-compat.a] Error 2 ... -- Tim Rice Multitalents (707) 887-1469 tim at multitalents.net
Ok... This is the second report. It's occured on NeXT Also. In bsd-snprintf.c put in: #define HAVE_STDARG_H and see if that solves it. On Mon, 12 Feb 2001, Tim Rice wrote:> > It looks like something got broken in openbsd-compat/bsd-snprintf.c > ... > gcc -g -O2 -Wall -Dftruncate=chsize -I/usr/local/include -I/usr/local/ssl/includ > e -I. -I.. -I../src/openbsd-compat -I../src/openbsd-compat/.. -DHAVE_CONFIG_H -c > ../src/openbsd-compat/bsd-snprintf.c > In file included from ../src/openbsd-compat/bsd-snprintf.c:72: > /usr/local/lib/gcc-lib/i486-unknown-sco3.2v4.2/2.7.2.1/include/varargs.h:88: war > ning: `va_start' redefined > /usr/local/lib/gcc-lib/i486-unknown-sco3.2v4.2/2.7.2.1/include/stdarg.h:72: warn > ing: this is the location of the previous definition > ./src/openbsd-compat/bsd-snprintf.c: In function `snprintf': > ./src/openbsd-compat/bsd-snprintf.c:725: argument `__builtin_va_alist' doesn't > match prototype > ./src/openbsd-compat/bsd-snprintf.h:11: prototype declaration > ./src/openbsd-compat/bsd-snprintf.c:725: number of arguments doesn't match prot > otype > ./src/openbsd-compat/bsd-snprintf.h:11: prototype declaration > gmake[1]: *** [bsd-snprintf.o] Error 1 > gmake[1]: Leaving directory `/usr2/src/networking/openssh/openbsd-compat' > gmake: *** [openbsd-compat/libopenbsd-compat.a] Error 2 > ... > >
No fchown() on SCO Open Server 3 Patch attached -- Tim Rice Multitalents (707) 887-1469 tim at multitalents.net -------------- next part -------------- --- openssh_cvs/configure.in.old Mon Feb 12 14:04:32 2001 +++ openssh_cvs/configure.in Mon Feb 12 17:21:15 2001 @@ -325,10 +325,10 @@ ) # Checks for header files. -AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h getopt.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h) +AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h getopt.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stdarg.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h) dnl Checks for library functions. -AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv seteuid setlogin setproctitle setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop) +AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv seteuid setlogin setproctitle setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop) dnl Checks for time functions AC_CHECK_FUNCS(gettimeofday time) dnl Checks for libutil functions --- openssh_cvs/sftp-server.c.old Sat Feb 10 19:39:44 2001 +++ openssh_cvs/sftp-server.c Mon Feb 12 17:30:38 2001 @@ -609,7 +609,11 @@ status = errno_to_portable(errno); } if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) { +#ifdef HAVE_FCHOWN ret = fchown(fd, a->uid, a->gid); +#else + ret = chown(name, a->uid, a->gid); +#endif if (ret == -1) status = errno_to_portable(errno); }
There is alot of other stuff I'd like to do with bsd-snprintf.c, but if you use this patch does things compile better? (And they will be done, but I doubt wants a patch that reformats the whole bsd-snprintf.c in their mailbox. =) I pretty much removed 'varargs' and expanded the macros which did a simple clean up. Before people start yelling about the lack of 'varargs' in my defence.. We don't support them anywhere else.. Therefor it seems silly to support them in bsd-snprintf.c. =) - Ben --- ../../openssh/openbsd-compat/bsd-snprintf.c Thu Feb 8 20:57:55 2001 +++ bsd-snprintf.c Mon Feb 12 19:35:53 2001 @@ -50,39 +50,6 @@ #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) -#include <string.h> -# include <ctype.h> -#include <sys/types.h> - -/* Define this as a fall through, HAVE_STDARG_H is probably already set */ - -#define HAVE_VARARGS_H - -/* varargs declarations: */ - -#if defined(HAVE_STDARG_H) -# include <stdarg.h> -# define HAVE_STDARGS /* let's hope that works everywhere (mj) */ -# define VA_LOCAL_DECL va_list ap -# define VA_START(f) va_start(ap, f) -# define VA_SHIFT(v,t) ; /* no-op for ANSI */ -# define VA_END va_end(ap) -#else -# if defined(HAVE_VARARGS_H) -# include <varargs.h> -# undef HAVE_STDARGS -# define VA_LOCAL_DECL va_list ap -# define VA_START(f) va_start(ap) /* f is ignored! */ -# define VA_SHIFT(v,t) v = va_arg(ap,t) -# define VA_END va_end(ap) -# else -/*XX ** NO VARARGS ** XX*/ -# endif -#endif - -/*int snprintf (char *str, size_t count, const char *fmt, ...);*/ -/*int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);*/ - static void dopr (char *buffer, size_t maxlen, const char *format, va_list args); static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, @@ -718,27 +685,15 @@ #endif /* !HAVE_VSNPRINTF */ #ifndef HAVE_SNPRINTF -/* VARARGS3 */ -#ifdef HAVE_STDARGS int snprintf (char *str,size_t count,const char *fmt,...) -#else -int snprintf (va_alist) va_dcl -#endif { -#ifndef HAVE_STDARGS - char *str; - size_t count; - char *fmt; -#endif - VA_LOCAL_DECL; - - VA_START (fmt); - VA_SHIFT (str, char *); - VA_SHIFT (count, size_t ); - VA_SHIFT (fmt, char *); - (void) vsnprintf(str, count, fmt, ap); - VA_END; - return(strlen(str)); + va_list ap; + + va_start(ap, fmt); + (void) vsnprintf(str, count, fmt, ap); + va_end(ap); + + return(strlen(str)); } #ifdef TEST_SNPRINTF
mouring at etoh.eviladmin.org
2001-Feb-13 03:34 UTC
fchown() in sftp-server.c (CVS 01/12/01)
Applied On Mon, 12 Feb 2001, Tim Rice wrote:> > No fchown() on SCO Open Server 3 > > Patch attached > >
Hi, On Mon, Feb 12, 2001 at 02:55:34PM -0800, Tim Rice wrote:> /usr/local/lib/gcc-lib/i486-unknown-sco3.2v4.2/2.7.2.1/include/varargs.h:88: war > ning: `va_start' redefined > /usr/local/lib/gcc-lib/i486-unknown-sco3.2v4.2/2.7.2.1/include/stdarg.h:72: warn > ing: this is the location of the previous definitionLooks like *both* varargs.h and stdarg.h are included, which is bad because they are incompatible (and result in a different syntax for functions with a varying number of arguments). gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany gert at greenie.muc.de fax: +49-89-35655025 gert.doering at physik.tu-muenchen.de
Possibly Parallel Threads
- bsd-snprintf.c and NeXT.
- Platform-specific: simple assignments in Rprofile cause core dump (PR#1604)
- [Bug 615] OpenSSH 3.6.1p2 ON SCO 3.2v4.2 + STRICTMODES -->yes (broken dirname in libgen)
- [LLVMdev] Extracting all BasicBlocks of a Function into new Function
- test request: SCO with setluid() (i686-pc-sco3.2v5.0.7, possibly others)