mirror of
https://gitlab.com/procps-ng/procps.git
synced 2024-11-28 04:24:59 +08:00
64-bit time for Linux 2.5.xx
This commit is contained in:
parent
58d7de98cf
commit
bc92025b7b
@ -412,7 +412,7 @@ void self_info(void){
|
||||
/* open_psdb(namelist_file); */
|
||||
fprintf(stderr,
|
||||
"personality=0x%08x (from \"%s\")\n"
|
||||
"EUID=%d TTY=%d,%d Hertz=%ld\n"
|
||||
"EUID=%d TTY=%d,%d Hertz=%Ld\n"
|
||||
/* "namelist_file=\"%s\"\n" */
|
||||
,
|
||||
personality, saved_personality_text,
|
||||
|
@ -586,7 +586,7 @@ static int pr_s(void){
|
||||
static int pr_flag(void){
|
||||
/* Unix98 requires octal flags */
|
||||
/* this user-hostile and volatile junk gets 1 character */
|
||||
return snprintf(outbuf, COLWID, "%o", (pp->flags>>6)&0x7);
|
||||
return snprintf(outbuf, COLWID, "%o", (unsigned)(pp->flags>>6U)&0x7U);
|
||||
}
|
||||
|
||||
static int pr_euid(void){
|
||||
@ -625,7 +625,7 @@ static int old_time_helper(char *dst, unsigned long long t, unsigned long long r
|
||||
if(t == ~0ULL) return snprintf(dst, COLWID, " xx");
|
||||
if((long long)(t-=rel) < 0) t=0ULL;
|
||||
if(t>9999ULL) return snprintf(dst, COLWID, "%5Lu", t/100ULL);
|
||||
else return snprintf(dst, COLWID, "%2lu.%02lu", (unsigned)t/100U, (unsigned)t%100U);
|
||||
else return snprintf(dst, COLWID, "%2u.%02u", (unsigned)t/100U, (unsigned)t%100U);
|
||||
}
|
||||
|
||||
static int pr_bsdtime(void){
|
||||
|
Loading…
Reference in New Issue
Block a user