Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
procinfo
procinfo-gccver.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File procinfo-gccver.diff of Package procinfo
--- procinfo-18/routines.c +++ procinfo-18/routines.c @@ -275,6 +275,8 @@ if (ret != 5) /* Damn egcs uses nested ()'s... */ ret = sscanf (line, "Linux version %s (%[^)]) (gcc %[^(] (%*[^)])) #%s %[^\n]", ver, host, gcc, compno, date); + if (ret != 5) /* Maybe even one layer more */ + ret = sscanf (line, "Linux version %s (%[^)]) (gcc %[^(] (%*[^)]) (%*[^)])) #%s %[^\n]", ver, host, gcc, compno, date); if (ret == 3) { /* At least we've got ver & host right... */ strcpy (gcc, "[can't parse]"); @@ -282,6 +284,10 @@ date[0] = 0; } + len = strlen(gcc) - 1; + while(gcc[len] == ' ') + gcc[len--] = '\0'; + /* BTW, from here we're free to re-use line[]. */ here = strdup (myname);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor