diff options
author | axel <axel@liljencrantz.se> | 2006-01-21 00:27:21 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-01-21 00:27:21 +1000 |
commit | a47065f6481a412c2a69ab248b21d6f739361438 (patch) | |
tree | e108c09e0ba6f76916d70469dcb417d4063332c7 /proc.c | |
parent | 70351b0e4fbff2c5f2e58fd5eb8553f973714ee7 (diff) |
Add fallback implementations of wcstok, putwc and getwc. Move all fallbacks from common.c to wutil.c.
darcs-hash:20060120142721-ac50b-4b9850d889e2210e1d545339e29dcc038a3f2b04.gz
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -650,12 +650,15 @@ int job_reap( int interactive ) #ifdef HAVE__PROC_SELF_STAT + +#define FN_SIZE 256 + /** Get the CPU time for the specified process */ unsigned long proc_get_jiffies( process_t *p ) { - wchar_t fn[256]; + wchar_t fn[FN_SIZE]; //char stat_line[1024]; char state; @@ -678,7 +681,7 @@ unsigned long proc_get_jiffies( process_t *p ) if( p->pid <= 0 ) return 0; - swprintf( fn, 512, L"/proc/%d/stat", p->pid ); + swprintf( fn, FN_SIZE, L"/proc/%d/stat", p->pid ); FILE *f = wfopen( fn, "r" ); if( !f ) |