|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-07-26 01:15 UTC] waldschrott@php.net
[2000-07-26 01:26 UTC] waldschrott@php.net
[2000-08-18 13:28 UTC] waldschrott@php.net
[2000-08-29 18:44 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Sequent Dynix/Ptx 4.4.4 has only two elements in struct rusage. my_init.c must have the extra elements protected with an #ifdef just as in microtime.c. Here is the symptoms' compiler error display, followed by something nearly resembling a fix. The semblance is near enough to solve the problem on my machine. It is intended to retain the extended functionality on all other machines. Making all in libmysql cc -DHAVE_CONFIG_H -I. -I/opt/php-4.0.0/ext/mysql/libmysql -I/opt/php-4.0.0 -I/opt/php-4.0.0/Zend -I/opt/php-4.0.0 -I/opt/php-4.0.0/ext/mysql/libmysql -I/opt/php-4.0.0/ext/xml/expat/xmltok -I/opt/php-4.0.0/ext/xml/expat/xmlparse -DXML_BYTE_ORDER=12 -Wc,+abi-socket -g -c my_init.c && touch my_init.lo "my_init.c", line 102: undefined struct/union member: ru_maxrss "my_init.c", line 102: undefined struct/union member: ru_idrss "my_init.c", line 103: undefined struct/union member: ru_minflt "my_init.c", line 103: undefined struct/union member: ru_majflt "my_init.c", line 104: undefined struct/union member: ru_nswap "my_init.c", line 104: undefined struct/union member: ru_inblock "my_init.c", line 104: undefined struct/union member: ru_oublock "my_init.c", line 105: undefined struct/union member: ru_msgsnd "my_init.c", line 105: undefined struct/union member: ru_msgrcv "my_init.c", line 105: undefined struct/union member: ru_nsignals "my_init.c", line 106: undefined struct/union member: ru_nvcsw "my_init.c", line 106: undefined struct/union member: ru_nivcsw *** Error code 1 Make: . Stop. *** Error code 1 Make: . Stop. *** Error code 1 Make: . Stop. *** Error code 1 Make: . Stop. *** Error code 1 Make: . Stop. % Ow. Now for the fix. This diff is against PHP 4.0.0 Release. Observe the moved commas and closing pren. The minor spelling correction is included because I noticed it, not because I spell perfectly. Note that not all C compilers join contiguous strings, as they ought, so this "fix" might break working code on some platforms. % diff my_init.orig my_init.c 97c97,101 < fprintf(info_file,"\nUser time %.2f, System time %.2f\nMaximum resident set size %d, Integral resident set size %d\nNon physical pagefaults %d, Physical pagefaults %d, Swaps %d\nBlocks in %d out %d, Messages in %d out %d, Signals %d\nVouluntary context switches %d, Invouluntary context switches %d\n", --- > fprintf(info_file,"\nUser time %.2f, System time %.2f\n" > #ifdef _OSD_POSIX /* Some have only a few fields in the rusage struct */ > "Maximum resident set size %d, Integral resident set size %d\nNon physical pagefaults %d, Physical pagefaults %d, Swaps %d\nBlocks in %d out %d, Messages in %d out %d, Signals %d\nVoluntary context switches %d, Involuntary context switches %d\n" > #endif > , 101c105,107 < rus.ru_stime.tv_usec / SCALE_USEC) / 100.0, --- > rus.ru_stime.tv_usec / SCALE_USEC) / 100.0 > #ifdef _OSD_POSIX /* Some have only a few fields in the rusage struct */ > , 106c112,114 < rus.ru_nvcsw, rus.ru_nivcsw); --- > rus.ru_nvcsw, rus.ru_nivcsw > #endif > ); %