diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-08-15 08:59:09 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-08-15 08:59:09 (GMT) |
commit | 2d85a1f9deb33cad80923f44a691189b7aefd8a5 (patch) | |
tree | e4dc525d510f8a4c829630b6636d35d3c7936061 /compat | |
parent | bce65c12f657a40e26fc4b42de6047d98ee7e012 (diff) | |
parent | 62d4e2a24eedc77e3aff652f43cf553f8eecca3a (diff) | |
download | tcl-2d85a1f9deb33cad80923f44a691189b7aefd8a5.zip tcl-2d85a1f9deb33cad80923f44a691189b7aefd8a5.tar.gz tcl-2d85a1f9deb33cad80923f44a691189b7aefd8a5.tar.bz2 |
Merge 8.7
Diffstat (limited to 'compat')
-rw-r--r-- | compat/fake-rfc2553.c | 3 | ||||
-rw-r--r-- | compat/gettod.c | 3 | ||||
-rw-r--r-- | compat/mkstemp.c | 13 | ||||
-rw-r--r-- | compat/opendir.c | 12 | ||||
-rw-r--r-- | compat/strstr.c | 4 | ||||
-rw-r--r-- | compat/strtol.c | 2 | ||||
-rw-r--r-- | compat/strtoul.c | 6 | ||||
-rw-r--r-- | compat/waitpid.c | 2 | ||||
-rw-r--r-- | compat/zlib/contrib/minizip/crypt.h | 2 |
9 files changed, 25 insertions, 22 deletions
diff --git a/compat/fake-rfc2553.c b/compat/fake-rfc2553.c index c8e69400..29e2b56 100644 --- a/compat/fake-rfc2553.c +++ b/compat/fake-rfc2553.c @@ -73,6 +73,7 @@ int fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host, struct sockaddr_in *sin = (struct sockaddr_in *)sa; struct hostent *hp; char tmpserv[16]; + (void)salen; if (sa->sa_family != AF_UNSPEC && sa->sa_family != AF_INET) return (EAI_FAMILY); @@ -153,7 +154,7 @@ addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints) { struct addrinfo *ai; - ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in)); + ai = (struct addrinfo *)malloc(sizeof(*ai) + sizeof(struct sockaddr_in)); if (ai == NULL) return (NULL); diff --git a/compat/gettod.c b/compat/gettod.c index ca20cf8..f6651d4 100644 --- a/compat/gettod.c +++ b/compat/gettod.c @@ -21,10 +21,11 @@ gettimeofday( struct timezone *tz) { struct timeb t; + (void)tz; ftime(&t); tp->tv_sec = t.time; - tp->tv_usec = t. millitm * 1000; + tp->tv_usec = t.millitm * 1000; return 0; } diff --git a/compat/mkstemp.c b/compat/mkstemp.c index 1a44dfa..feccfbb 100644 --- a/compat/mkstemp.c +++ b/compat/mkstemp.c @@ -13,6 +13,7 @@ #include <fcntl.h> #include <stdlib.h> #include <unistd.h> +#include <string.h> /* *---------------------------------------------------------------------- @@ -32,19 +33,19 @@ int mkstemp( - char *template) /* Template for filename. */ + char *tmpl) /* Template for filename. */ { static const char alphanumerics[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - register char *a, *b; + char *a, *b; int fd, count, alphanumericsLen = strlen(alphanumerics); /* == 62 */ - a = template + strlen(template); - while (a > template && *(a-1) == 'X') { + a = tmpl + strlen(tmpl); + while (a > tmpl && *(a-1) == 'X') { a--; } - if (a == template) { + if (a == tmpl) { errno = ENOENT; return -1; } @@ -71,7 +72,7 @@ mkstemp( * Template is now realized; try to open (with correct options). */ - fd = open(template, O_RDWR|O_CREAT|O_EXCL, 0600); + fd = open(tmpl, O_RDWR|O_CREAT|O_EXCL, 0600); } while (fd == -1 && errno == EEXIST && --count > 0); return fd; diff --git a/compat/opendir.c b/compat/opendir.c index 7a49566..25a7ada 100644 --- a/compat/opendir.c +++ b/compat/opendir.c @@ -20,9 +20,9 @@ DIR * opendir( char *name) { - register DIR *dirp; - register int fd; - char *myname; + DIR *dirp; + int fd; + const char *myname; myname = ((*name == '\0') ? "." : name); if ((fd = open(myname, 0, 0)) == -1) { @@ -65,9 +65,9 @@ struct olddirect { struct dirent * readdir( - register DIR *dirp) + DIR *dirp) { - register struct olddirect *dp; + struct olddirect *dp; static struct dirent dir; for (;;) { @@ -101,7 +101,7 @@ readdir( void closedir( - register DIR *dirp) + DIR *dirp) { close(dirp->dd_fd); dirp->dd_fd = -1; diff --git a/compat/strstr.c b/compat/strstr.c index e3b9b8d..206dca9 100644 --- a/compat/strstr.c +++ b/compat/strstr.c @@ -36,10 +36,10 @@ char * strstr( - register char *string, /* String to search. */ + char *string, /* String to search. */ char *substring) /* Substring to try to find in string. */ { - register char *a, *b; + char *a, *b; /* * First scan quickly through the two strings looking for a diff --git a/compat/strtol.c b/compat/strtol.c index b7f6919..22cc1eb 100644 --- a/compat/strtol.c +++ b/compat/strtol.c @@ -45,7 +45,7 @@ strtol( * hex, "0" means octal, anything else means * decimal. */ { - register const char *p; + const char *p; long result; /* diff --git a/compat/strtoul.c b/compat/strtoul.c index e37eb05..bf16f7a 100644 --- a/compat/strtoul.c +++ b/compat/strtoul.c @@ -62,9 +62,9 @@ strtoul( * hex, "0" means octal, anything else means * decimal. */ { - register const char *p; - register unsigned long int result = 0; - register unsigned digit; + const char *p; + unsigned long int result = 0; + unsigned digit; int anyDigits = 0; int negative=0; int overflow=0; diff --git a/compat/waitpid.c b/compat/waitpid.c index d4473a8..626d210 100644 --- a/compat/waitpid.c +++ b/compat/waitpid.c @@ -70,7 +70,7 @@ waitpid( int options) /* OR'ed combination of WNOHANG and * WUNTRACED. */ { - register WaitInfo *waitPtr, *prevPtr; + WaitInfo *waitPtr, *prevPtr; pid_t result; WAIT_STATUS_TYPE status; diff --git a/compat/zlib/contrib/minizip/crypt.h b/compat/zlib/contrib/minizip/crypt.h index c422c26..2c3044b 100644 --- a/compat/zlib/contrib/minizip/crypt.h +++ b/compat/zlib/contrib/minizip/crypt.h @@ -57,7 +57,7 @@ static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c) (*(pkeys+1)) += (*(pkeys+0)) & 0xff; (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; { - register int keyshift = (int)((*(pkeys+1)) >> 24); + int keyshift = (int)((*(pkeys+1)) >> 24); (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); } return c; |