diff options
Diffstat (limited to 'usr/src/lib/libresolv2/common/bsd')
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/daemon.c | 11 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/ftruncate.c | 12 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/gettimeofday.c | 47 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/mktemp.c | 14 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/putenv.c | 14 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/readv.c | 11 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/setenv.c | 42 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/setitimer.c | 14 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/strcasecmp.c | 14 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/strdup.c | 10 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/strerror.c | 21 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/strpbrk.c | 14 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/strsep.c | 13 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/strtoul.c | 22 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/utimes.c | 25 | ||||
| -rw-r--r-- | usr/src/lib/libresolv2/common/bsd/writev.c | 14 | 
16 files changed, 119 insertions, 179 deletions
| diff --git a/usr/src/lib/libresolv2/common/bsd/daemon.c b/usr/src/lib/libresolv2/common/bsd/daemon.c index aeb4f2c083..54ff83b753 100644 --- a/usr/src/lib/libresolv2/common/bsd/daemon.c +++ b/usr/src/lib/libresolv2/common/bsd/daemon.c @@ -1,11 +1,6 @@ -/* - * Copyright (c) 1997-2000 by Sun Microsystems, Inc. - * All rights reserved. - */ -  #if defined(LIBC_SCCS) && !defined(lint)  static const char sccsid[] = "@(#)daemon.c	8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: daemon.c,v 8.2 1999/10/13 16:39:20 vixie Exp $"; +static const char rcsid[] = "$Id: daemon.c,v 1.2 2005/04/27 04:56:10 sra Exp $";  #endif /* LIBC_SCCS and not lint */  /* @@ -41,8 +36,6 @@ static const char rcsid[] = "$Id: daemon.c,v 8.2 1999/10/13 16:39:20 vixie Exp $   * SUCH DAMAGE.   */ -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <fcntl.h> @@ -84,3 +77,5 @@ daemon(int nochdir, int noclose) {  	return (0);  }  #endif + +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/ftruncate.c b/usr/src/lib/libresolv2/common/bsd/ftruncate.c index 98b953b312..5ac4ebac9b 100644 --- a/usr/src/lib/libresolv2/common/bsd/ftruncate.c +++ b/usr/src/lib/libresolv2/common/bsd/ftruncate.c @@ -1,15 +1,9 @@ -/* - * Copyright (c) 1997-2000 by Sun Microsystems, Inc. - * All rights reserved. - */ -  #ifndef LINT -static const char rcsid[] = "$Id: ftruncate.c,v 8.4 1999/10/13 16:39:21 vixie Exp $"; +static const char rcsid[] = "$Id: ftruncate.c,v 1.3 2005/04/27 18:16:45 sra Exp $";  #endif -#pragma ident	"%Z%%M%	%I%	%E% SMI" - -/* +/*! \file + * \brief   * ftruncate - set file size, BSD Style   *   * shortens or enlarges the file as neeeded diff --git a/usr/src/lib/libresolv2/common/bsd/gettimeofday.c b/usr/src/lib/libresolv2/common/bsd/gettimeofday.c index 68b5ca39a0..2926a3575e 100644 --- a/usr/src/lib/libresolv2/common/bsd/gettimeofday.c +++ b/usr/src/lib/libresolv2/common/bsd/gettimeofday.c @@ -1,20 +1,47 @@ -/* - * Copyright (c) 1997-2000 by Sun Microsystems, Inc. - * All rights reserved. - */ -  #ifndef LINT -static const char rcsid[] = "$Id: gettimeofday.c,v 8.4 1999/10/13 16:39:21 vixie Exp $"; +static const char rcsid[] = "$Id: gettimeofday.c,v 1.4 2005/04/27 04:56:11 sra Exp $";  #endif - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h" +#include <stdio.h> +#include <syslog.h> +#include <sys/time.h>  #include "port_after.h"  #if !defined(NEED_GETTIMEOFDAY) -int __bindcompat_gettimeofday; +/*% + * gettimeofday() occasionally returns invalid tv_usec on some platforms. + */ +#define MILLION 1000000 +#undef gettimeofday + +int +isc__gettimeofday(struct timeval *tp, struct timezone *tzp) { +	int res; + +	res = gettimeofday(tp, tzp); +	if (res < 0) +		return (res); +	if (tp == NULL) +		return (res); +	if (tp->tv_usec < 0) { +		do { +			tp->tv_usec += MILLION; +			tp->tv_sec--; +		} while (tp->tv_usec < 0); +		goto log; +	} else if (tp->tv_usec > MILLION) { +		do { +			tp->tv_usec -= MILLION; +			tp->tv_sec++; +		} while (tp->tv_usec > MILLION); +		goto log; +	} +	return (res); + log: +	syslog(LOG_ERR, "gettimeofday: tv_usec out of range\n"); +	return (res); +}  #else  int  gettimeofday(struct timeval *tvp, struct _TIMEZONE *tzp) { diff --git a/usr/src/lib/libresolv2/common/bsd/mktemp.c b/usr/src/lib/libresolv2/common/bsd/mktemp.c index b29ae93d51..001b24b58f 100644 --- a/usr/src/lib/libresolv2/common/bsd/mktemp.c +++ b/usr/src/lib/libresolv2/common/bsd/mktemp.c @@ -1,11 +1,6 @@ -/* - * Copyright (c) 1997-2000 by Sun Microsystems, Inc. - * All rights reserved. - */ -  #if defined(LIBC_SCCS) && !defined(lint)  static const char sccsid[] = "@(#)mktemp.c	8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: mktemp.c,v 8.4 1999/10/13 16:39:21 vixie Exp $"; +static const char rcsid[] = "$Id: mktemp.c,v 1.2 2005/04/27 04:56:11 sra Exp $";  #endif /* LIBC_SCCS and not lint */  /* @@ -61,9 +56,6 @@ static const char rcsid[] = "$Id: mktemp.c,v 8.4 1999/10/13 16:39:21 vixie Exp $   * SOFTWARE.   */ - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <sys/types.h> @@ -104,7 +96,7 @@ gettemp(char *path, int *doopen) {  	u_int pid;  	pid = getpid(); -	for (trv = path; *trv; ++trv);		/* extra X's get set to 0's */ +	for (trv = path; *trv; ++trv);		/*%< extra X's get set to 0's */  	while (*--trv == 'X') {  		*trv = (pid % 10) + '0';  		pid /= 10; @@ -160,3 +152,5 @@ gettemp(char *path, int *doopen) {  }  #endif /*NEED_MKTEMP*/ + +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/putenv.c b/usr/src/lib/libresolv2/common/bsd/putenv.c index 08ef44463e..2dcbc57e6c 100644 --- a/usr/src/lib/libresolv2/common/bsd/putenv.c +++ b/usr/src/lib/libresolv2/common/bsd/putenv.c @@ -1,19 +1,11 @@ -/* - * Copyright (c) 1997-2000 by Sun Microsystems, Inc. - * All rights reserved. - */ -  #ifndef LINT -static const char rcsid[] = "$Id: putenv.c,v 8.4 1999/10/13 16:39:21 vixie Exp $"; +static const char rcsid[] = "$Id: putenv.c,v 1.2 2005/04/27 04:56:11 sra Exp $";  #endif - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include "port_after.h" -/* +/*%   * To give a little credit to Sun, SGI,   * and many vendors in the SysV world.   */ @@ -31,3 +23,5 @@ putenv(char *str) {  	return (setenv(str, tmp, 1));  }  #endif + +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/readv.c b/usr/src/lib/libresolv2/common/bsd/readv.c index 5852e2e20a..5fa691a92f 100644 --- a/usr/src/lib/libresolv2/common/bsd/readv.c +++ b/usr/src/lib/libresolv2/common/bsd/readv.c @@ -1,15 +1,7 @@ -/* - * Copyright (c) 1997-2000 by Sun Microsystems, Inc. - * All rights reserved. - */ -  #ifndef LINT -static const char rcsid[] = "$Id: readv.c,v 8.2 1999/10/13 16:39:21 vixie Exp $"; +static const char rcsid[] = "$Id: readv.c,v 1.2 2005/04/27 04:56:11 sra Exp $";  #endif - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <sys/types.h> @@ -44,3 +36,4 @@ __readv(fd, vp, vpcount)  	return (count);  }  #endif /* NEED_READV */ +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/setenv.c b/usr/src/lib/libresolv2/common/bsd/setenv.c index 963d0e6e1b..baf00f6ff2 100644 --- a/usr/src/lib/libresolv2/common/bsd/setenv.c +++ b/usr/src/lib/libresolv2/common/bsd/setenv.c @@ -1,11 +1,6 @@ -/* - * Copyright (c) 1997, by Sun Microsystems, Inc. - * All rights reserved. - */ -  #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)setenv.c	8.1 (Berkeley) 6/4/93"; -static char rcsid[] = "$Id: setenv.c,v 8.4 1997/04/24 22:00:38 vixie Exp $"; +static const char sccsid[] = "@(#)setenv.c	8.1 (Berkeley) 6/4/93"; +static const char rcsid[] = "$Id: setenv.c,v 1.2 2005/04/27 04:56:11 sra Exp $";  #endif /* LIBC_SCCS and not lint */  /* @@ -41,9 +36,6 @@ static char rcsid[] = "$Id: setenv.c,v 8.4 1997/04/24 22:00:38 vixie Exp $";   * SUCH DAMAGE.   */ - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <stddef.h> @@ -60,40 +52,40 @@ extern char **environ;  static char *findenv(const char *name, int *offset); -/* +/*%   * setenv --   *	Set the value of the environmental variable "name" to be   *	"value".  If rewrite is set, replace any current value.   */  setenv(const char *name, const char *value, int rewrite) {  	extern char **environ; -	static int alloced;			/* if allocated space before */ +	static int alloced;			/*%< if allocated space before */  	char *c;  	int l_value, offset; -	if (*value == '=')			/* no `=' in value */ +	if (*value == '=')			/*%< no `=' in value */  		++value;  	l_value = strlen(value); -	if ((c = findenv(name, &offset))) {	/* find if already exists */ +	if ((c = findenv(name, &offset))) {	/*%< find if already exists */  		if (!rewrite)  			return (0); -		if (strlen(c) >= l_value) {	/* old larger; copy over */ +		if (strlen(c) >= l_value) {	/*%< old larger; copy over */  			while (*c++ = *value++);  			return (0);  		} -	} else {					/* create new slot */ +	} else {					/*%< create new slot */  		int cnt;  		char **p;  		for (p = environ, cnt = 0; *p; ++p, ++cnt); -		if (alloced) {			/* just increase size */ +		if (alloced) {			/*%< just increase size */  			environ = (char **)realloc((char *)environ,  			    (size_t)(sizeof(char *) * (cnt + 2)));  			if (!environ)  				return (-1);  		} -		else {				/* get new space */ -			alloced = 1;		/* copy old entries into it */ +		else {				/*%< get new space */ +			alloced = 1;		/*%< copy old entries into it */  			p = malloc((size_t)(sizeof(char *) * (cnt + 2)));  			if (!p)  				return (-1); @@ -103,8 +95,8 @@ setenv(const char *name, const char *value, int rewrite) {  		environ[cnt + 1] = NULL;  		offset = cnt;  	} -	for (c = (char *)name; *c && *c != '='; ++c);	/* no `=' in name */ -	if (!(environ[offset] =			/* name + `=' + value */ +	for (c = (char *)name; *c && *c != '='; ++c);	/*%< no `=' in name */ +	if (!(environ[offset] =			/*%< name + `=' + value */  	    malloc((size_t)((int)(c - name) + l_value + 2))))  		return (-1);  	for (c = environ[offset]; (*c = *name++) && *c != '='; ++c); @@ -112,7 +104,7 @@ setenv(const char *name, const char *value, int rewrite) {  	return (0);  } -/* +/*%   * unsetenv(name) --   *	Delete environmental variable "name".   */ @@ -121,13 +113,13 @@ unsetenv(const char *name) {  	char **p;  	int offset; -	while (findenv(name, &offset))	/* if set multiple times */ +	while (findenv(name, &offset))	/*%< if set multiple times */  		for (p = &environ[offset];; ++p)  			if (!(*p = *(p + 1)))  				break;  } -/* +/*%   * findenv --   *	Returns pointer to value associated with name, if any, else NULL.   *	Sets offset to be the offset of the name/value combination in the @@ -155,3 +147,5 @@ findenv(const char *name, int *offset) {  	return (NULL);  }  #endif + +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/setitimer.c b/usr/src/lib/libresolv2/common/bsd/setitimer.c index a0185c9c1d..67881d7ca8 100644 --- a/usr/src/lib/libresolv2/common/bsd/setitimer.c +++ b/usr/src/lib/libresolv2/common/bsd/setitimer.c @@ -1,22 +1,14 @@ -/* - * Copyright (c) 1997-2000 by Sun Microsystems, Inc. - * All rights reserved. - */ -  #ifndef LINT -static const char rcsid[] = "$Id: setitimer.c,v 8.4 1999/10/13 16:39:21 vixie Exp $"; +static const char rcsid[] = "$Id: setitimer.c,v 1.2 2005/04/27 04:56:12 sra Exp $";  #endif - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <sys/time.h>  #include "port_after.h" -/* +/*%   * Setitimer emulation routine.   */  #ifndef NEED_SETITIMER @@ -33,3 +25,5 @@ __setitimer(int which, const struct itimerval *value,  		return (-1);  }  #endif + +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/strcasecmp.c b/usr/src/lib/libresolv2/common/bsd/strcasecmp.c index 69e71760f0..0c9f0dccf0 100644 --- a/usr/src/lib/libresolv2/common/bsd/strcasecmp.c +++ b/usr/src/lib/libresolv2/common/bsd/strcasecmp.c @@ -1,11 +1,6 @@ -/* - * Copyright (c) 1997-2000 by Sun Microsystems, Inc. - * All rights reserved. - */ -  #if defined(LIBC_SCCS) && !defined(lint)  static const char sccsid[] = "@(#)strcasecmp.c	8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: strcasecmp.c,v 8.5 1999/10/13 16:39:21 vixie Exp $"; +static const char rcsid[] = "$Id: strcasecmp.c,v 1.2 2005/04/27 04:56:12 sra Exp $";  #endif /* LIBC_SCCS and not lint */  /* @@ -41,9 +36,6 @@ static const char rcsid[] = "$Id: strcasecmp.c,v 8.5 1999/10/13 16:39:21 vixie E   * SUCH DAMAGE.   */ - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <sys/param.h> @@ -58,7 +50,7 @@ static const char rcsid[] = "$Id: strcasecmp.c,v 8.5 1999/10/13 16:39:21 vixie E  int __strcasecmp_unneeded__;  #else -/* +/*%   * This array is designed for mapping upper and lower case letter   * together for a case independent comparison.  The mappings are   * based upon ascii character sequences. @@ -128,3 +120,5 @@ strncasecmp(const char *s1, const char *s2, size_t n) {  }  #endif /*NEED_STRCASECMP*/ + +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/strdup.c b/usr/src/lib/libresolv2/common/bsd/strdup.c index d92ed9e91d..a8d31e9587 100644 --- a/usr/src/lib/libresolv2/common/bsd/strdup.c +++ b/usr/src/lib/libresolv2/common/bsd/strdup.c @@ -1,11 +1,3 @@ -/* - * Copyright (c) 1997, by Sun Microsystems, Inc. - * All rights reserved. - */ - - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <stdlib.h> @@ -24,3 +16,5 @@ strdup(const char *src) {  	return (dst);  }  #endif + +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/strerror.c b/usr/src/lib/libresolv2/common/bsd/strerror.c index 4d650edfc1..5973e63d5b 100644 --- a/usr/src/lib/libresolv2/common/bsd/strerror.c +++ b/usr/src/lib/libresolv2/common/bsd/strerror.c @@ -1,11 +1,6 @@ -/* - * Copyright 2003 Sun Microsystems, Inc.  All rights reserved. - * Use is subject to license terms. - */ -  #if defined(LIBC_SCCS) && !defined(lint)  static const char sccsid[] = "@(#)strerror.c	8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: strerror.c,v 8.7 2001/08/28 11:48:10 marka Exp $"; +static const char rcsid[] = "$Id: strerror.c,v 1.6 2008/02/18 03:49:08 marka Exp $";  #endif /* LIBC_SCCS and not lint */  /* @@ -41,8 +36,6 @@ static const char rcsid[] = "$Id: strerror.c,v 8.7 2001/08/28 11:48:10 marka Exp   * SUCH DAMAGE.   */ -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <sys/param.h> @@ -64,19 +57,21 @@ extern char *sys_errlist[];  const char *  isc_strerror(int num) {  #define	UPREFIX	"Unknown error: " -	static char ebuf[40] = UPREFIX;		/* 64-bit number + slop */ +	static char ebuf[40] = UPREFIX;		/*%< 64-bit number + slop */  	u_int errnum;  	char *p, *t; +#ifndef USE_SYSERROR_LIST  	const char *ret; +#endif  	char tmp[40]; -	errnum = num;				/* convert to unsigned */ +	errnum = num;				/*%< convert to unsigned */  #ifdef USE_SYSERROR_LIST -	if (errnum < sys_nerr) +	if (errnum < (u_int)sys_nerr)  		return (sys_errlist[errnum]);  #else  #undef strerror -	ret = strerror(num);			/* call strerror() in libc */ +	ret = strerror(num);			/*%< call strerror() in libc */  	if (ret != NULL)  		return(ret);  #endif @@ -95,3 +90,5 @@ isc_strerror(int num) {  }  #endif /*NEED_STRERROR*/ + +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/strpbrk.c b/usr/src/lib/libresolv2/common/bsd/strpbrk.c index d001f28d31..4c12d88e1c 100644 --- a/usr/src/lib/libresolv2/common/bsd/strpbrk.c +++ b/usr/src/lib/libresolv2/common/bsd/strpbrk.c @@ -1,11 +1,6 @@ -/* - * Copyright (c) 1997-2000 by Sun Microsystems, Inc. - * All rights reserved. - */ -  #if defined(LIBC_SCCS) && !defined(lint)  static const char sccsid[] = "@(#)strpbrk.c	8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: strpbrk.c,v 8.4 1999/10/13 16:39:21 vixie Exp $"; +static const char rcsid[] = "$Id: strpbrk.c,v 1.2 2005/04/27 04:56:12 sra Exp $";  #endif /* LIBC_SCCS and not lint */  /* @@ -41,9 +36,6 @@ static const char rcsid[] = "$Id: strpbrk.c,v 8.4 1999/10/13 16:39:21 vixie Exp   * SUCH DAMAGE.   */ - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <sys/param.h> @@ -57,7 +49,7 @@ static const char rcsid[] = "$Id: strpbrk.c,v 8.4 1999/10/13 16:39:21 vixie Exp  int __strpbrk_unneeded__;  #else -/* +/*%   * Find the first occurrence in s1 of a character in s2 (excluding NUL).   */  char * @@ -74,3 +66,5 @@ strpbrk(const char *s1, const char *s2) {  }  #endif /*NEED_STRPBRK*/ + +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/strsep.c b/usr/src/lib/libresolv2/common/bsd/strsep.c index bbbdf3bc75..c7969f0028 100644 --- a/usr/src/lib/libresolv2/common/bsd/strsep.c +++ b/usr/src/lib/libresolv2/common/bsd/strsep.c @@ -1,11 +1,6 @@ -/* - * Copyright (c) 1997, by Sun Microsystems, Inc. - * All rights reserved. - */ -  #if defined(LIBC_SCCS) && !defined(lint)  static const char sccsid[] = "strsep.c	8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: strsep.c,v 8.5 1996/11/18 09:09:04 vixie Exp $"; +static const char rcsid[] = "$Id: strsep.c,v 1.2 2005/04/27 04:56:12 sra Exp $";  #endif /* LIBC_SCCS and not lint */  /* @@ -41,8 +36,6 @@ static const char rcsid[] = "$Id: strsep.c,v 8.5 1996/11/18 09:09:04 vixie Exp $   * SUCH DAMAGE.   */ -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <sys/cdefs.h>  #include <string.h> @@ -53,7 +46,7 @@ static const char rcsid[] = "$Id: strsep.c,v 8.5 1996/11/18 09:09:04 vixie Exp $  int __strsep_unneeded__;  #else -/* +/*%   * Get next token from string *stringp, where tokens are possibly-empty   * strings separated by characters from delim.     * @@ -91,3 +84,5 @@ strsep(char **stringp, const char *delim) {  }  #endif /*NEED_STRSEP*/ + +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/strtoul.c b/usr/src/lib/libresolv2/common/bsd/strtoul.c index 41e23c1124..b37ff72729 100644 --- a/usr/src/lib/libresolv2/common/bsd/strtoul.c +++ b/usr/src/lib/libresolv2/common/bsd/strtoul.c @@ -1,11 +1,6 @@ -/* - * Copyright 2003 by Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ -  #if defined(LIBC_SCCS) && !defined(lint)  static const char sccsid[] = "@(#)strtoul.c	8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: strtoul.c,v 8.5 2002/07/06 02:35:04 marka Exp $"; +static const char rcsid[] = "$Id: strtoul.c,v 1.4 2008/02/18 03:49:08 marka Exp $";  #endif /* LIBC_SCCS and not lint */  /* @@ -41,9 +36,6 @@ static const char rcsid[] = "$Id: strtoul.c,v 8.5 2002/07/06 02:35:04 marka Exp   * SUCH DAMAGE.   */ - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <sys/types.h> @@ -60,7 +52,7 @@ static const char rcsid[] = "$Id: strtoul.c,v 8.5 2002/07/06 02:35:04 marka Exp  int __strtoul_unneeded__;  #else -/* +/*%   * Convert a string to an unsigned long integer.   *   * Ignores `locale' stuff.  Assumes that the upper and lower case @@ -78,7 +70,7 @@ strtoul(const char *nptr, char **endptr, int base) {  	 * See strtol for comments as to the logic used.  	 */  	do { -		c = *(unsigned char *)s++; +		c = *(const unsigned char *)s++;  	} while (isspace(c));  	if (c == '-') {  		neg = 1; @@ -95,7 +87,7 @@ strtoul(const char *nptr, char **endptr, int base) {  		base = c == '0' ? 8 : 10;  	cutoff = (u_long)ULONG_MAX / (u_long)base;  	cutlim = (u_long)ULONG_MAX % (u_long)base; -	for (acc = 0, any = 0;; c = *(unsigned char*)s++) { +	for (acc = 0, any = 0;; c = *(const unsigned char*)s++) {  		if (isdigit(c))  			c -= '0';  		else if (isalpha(c)) @@ -104,7 +96,7 @@ strtoul(const char *nptr, char **endptr, int base) {  			break;  		if (c >= base)  			break; -		if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim) +		if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))  			any = -1;  		else {  			any = 1; @@ -118,8 +110,10 @@ strtoul(const char *nptr, char **endptr, int base) {  	} else if (neg)  		acc = -acc;  	if (endptr != 0) -		*endptr = (char *)(any ? s - 1 : nptr); +		DE_CONST((any ? s - 1 : nptr), *endptr);  	return (acc);  }  #endif /*NEED_STRTOUL*/ + +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/utimes.c b/usr/src/lib/libresolv2/common/bsd/utimes.c index 8a461ddbd0..2f65cffe25 100644 --- a/usr/src/lib/libresolv2/common/bsd/utimes.c +++ b/usr/src/lib/libresolv2/common/bsd/utimes.c @@ -1,28 +1,20 @@  /* - * Copyright (c) 1997-2000 by Sun Microsystems, Inc. - * All rights reserved. - */ - -/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")   * Copyright (c) 1997,1999 by Internet Software Consortium.   *   * Permission to use, copy, modify, and distribute this software for any   * purpose with or without fee is hereby granted, provided that the above   * copyright notice and this permission notice appear in all copies.   * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   */ - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <sys/types.h> @@ -45,3 +37,4 @@ __utimes(char *filename, struct timeval *tvp) {  }  #endif /* NEED_UTIMES */ +/*! \file */ diff --git a/usr/src/lib/libresolv2/common/bsd/writev.c b/usr/src/lib/libresolv2/common/bsd/writev.c index 6e348810ec..65baa71cfc 100644 --- a/usr/src/lib/libresolv2/common/bsd/writev.c +++ b/usr/src/lib/libresolv2/common/bsd/writev.c @@ -1,15 +1,7 @@ -/* - * Copyright 2005 Sun Microsystems, Inc.  All rights reserved. - * Use is subject to license terms. - */ -  #ifndef LINT -static const char rcsid[] = "$Id: writev.c,v 8.6 2003/04/30 05:21:18 marka Exp $"; +static const char rcsid[] = "$Id: writev.c,v 1.3 2005/04/27 04:56:13 sra Exp $";  #endif - -#pragma ident	"%Z%%M%	%I%	%E% SMI" -  #include "port_before.h"  #include <sys/types.h> @@ -36,7 +28,7 @@ __writev(int fd, struct iovec *iov, int iovlen)  	/*  	 * Allow for atomic writes to network.  	 */ -	if (S_ISSOCK(statbuf.st_mode)) { +	if (statbuf.st_mode & S_IFSOCK) {  		struct msghdr   mesg;		  		memset(&mesg, 0, sizeof(mesg)); @@ -93,3 +85,5 @@ __writev(fd, vp, vpcount)  #endif /*_CRAY*/  #endif /*NEED_WRITEV*/ + +/*! \file */ | 
