summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-06-25 12:58:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-06-25 12:58:00 (GMT)
commit538b919b189ab1c46fa7b74b99c503240dfc0f6f (patch)
treed10a6e355d07c67ac1fdbd148a319cb2c982d302 /compat
parent53a1c724ce9fb550d72eb58cf3599411674da0c2 (diff)
parent97d82cb4b15f18701d239609308aa41c3b89d75c (diff)
downloadtcl-538b919b189ab1c46fa7b74b99c503240dfc0f6f.zip
tcl-538b919b189ab1c46fa7b74b99c503240dfc0f6f.tar.gz
tcl-538b919b189ab1c46fa7b74b99c503240dfc0f6f.tar.bz2
Merge 8.5
Diffstat (limited to 'compat')
-rw-r--r--compat/gettod.c3
-rw-r--r--compat/opendir.c14
-rw-r--r--compat/strstr.c10
-rw-r--r--compat/strtol.c2
-rw-r--r--compat/strtoul.c6
-rw-r--r--compat/waitpid.c2
6 files changed, 19 insertions, 18 deletions
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/opendir.c b/compat/opendir.c
index 22e8a3a..07ef572 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,10 +101,10 @@ readdir(
void
closedir(
- register DIR *dirp)
+ DIR *dirp)
{
close(dirp->dd_fd);
dirp->dd_fd = -1;
dirp->dd_loc = 0;
- ckfree((char *) dirp);
+ ckfree((char *)dirp);
}
diff --git a/compat/strstr.c b/compat/strstr.c
index e3b9b8d..35386d0 100644
--- a/compat/strstr.c
+++ b/compat/strstr.c
@@ -36,10 +36,10 @@
char *
strstr(
- register char *string, /* String to search. */
- char *substring) /* Substring to try to find in string. */
+ const char *string, /* String to search. */
+ const char *substring) /* Substring to try to find in string. */
{
- register char *a, *b;
+ const char *a, *b;
/*
* First scan quickly through the two strings looking for a
@@ -49,7 +49,7 @@ strstr(
b = substring;
if (*b == 0) {
- return string;
+ return (char *)string;
}
for ( ; *string != 0; string += 1) {
if (*string != *b) {
@@ -58,7 +58,7 @@ strstr(
a = string;
while (1) {
if (*b == 0) {
- return string;
+ return (char *)string;
}
if (*a++ != *b++) {
break;
diff --git a/compat/strtol.c b/compat/strtol.c
index 811006a..a9866f4 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 15587f1..af63036 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 e03275a..6f43934 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;