mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-09-03 06:46:55 +00:00
(gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
off_from_oct, size_from_oct, time_from_oct, uid_from_oct): Cast limit to uintmax_t, for benefit of pre-ANSI compilers with long long.
This commit is contained in:
+9
-9
@@ -1,5 +1,5 @@
|
||||
/* List a tar archive, with support routines for reading a tar archive.
|
||||
Copyright (C) 1988, 92, 93, 94, 96, 97 Free Software Foundation, Inc.
|
||||
Copyright 1988,92,93,94,96,97,98,1999 Free Software Foundation, Inc.
|
||||
Written by John Gilmore, on 1985-08-26.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
@@ -587,42 +587,42 @@ from_oct (const char *where0, size_t digs0, const char *type, uintmax_t maxval)
|
||||
gid_t
|
||||
gid_from_oct (const char *p, size_t s)
|
||||
{
|
||||
return from_oct (p, s, "gid_t", GID_MAX);
|
||||
return from_oct (p, s, "gid_t", (uintmax_t) GID_MAX);
|
||||
}
|
||||
major_t
|
||||
major_from_oct (const char *p, size_t s)
|
||||
{
|
||||
return from_oct (p, s, "major_t", MAJOR_MAX);
|
||||
return from_oct (p, s, "major_t", (uintmax_t) MAJOR_MAX);
|
||||
}
|
||||
minor_t
|
||||
minor_from_oct (const char *p, size_t s)
|
||||
{
|
||||
return from_oct (p, s, "minor_t", MINOR_MAX);
|
||||
return from_oct (p, s, "minor_t", (uintmax_t) MINOR_MAX);
|
||||
}
|
||||
mode_t
|
||||
mode_from_oct (const char *p, size_t s)
|
||||
{
|
||||
return from_oct (p, s, "mode_t", MODE_MAX);
|
||||
return from_oct (p, s, "mode_t", (uintmax_t) MODE_MAX);
|
||||
}
|
||||
off_t
|
||||
off_from_oct (const char *p, size_t s)
|
||||
{
|
||||
return from_oct (p, s, "off_t", OFF_MAX);
|
||||
return from_oct (p, s, "off_t", (uintmax_t) OFF_MAX);
|
||||
}
|
||||
size_t
|
||||
size_from_oct (const char *p, size_t s)
|
||||
{
|
||||
return from_oct (p, s, "size_t", SIZE_MAX);
|
||||
return from_oct (p, s, "size_t", (uintmax_t) SIZE_MAX);
|
||||
}
|
||||
time_t
|
||||
time_from_oct (const char *p, size_t s)
|
||||
{
|
||||
return from_oct (p, s, "time_t", TIME_MAX);
|
||||
return from_oct (p, s, "time_t", (uintmax_t) TIME_MAX);
|
||||
}
|
||||
uid_t
|
||||
uid_from_oct (const char *p, size_t s)
|
||||
{
|
||||
return from_oct (p, s, "uid_t", UID_MAX);
|
||||
return from_oct (p, s, "uid_t", (uintmax_t) UID_MAX);
|
||||
}
|
||||
uintmax_t
|
||||
uintmax_from_oct (const char *p, size_t s)
|
||||
|
||||
Reference in New Issue
Block a user