griswolf@UNDINE.CS.ORST.EDU (frank griswold) (01/03/90)
In g++ version 1.36.1, the file builtin.cc contains code near the bottom to implement a timer. However, for UTek 4300 machines, it quietly fails. Eirik Fuller has been building patches based on "ifdef tek4300" which he tells me you have. I would like you to add ONE of the following patches (or its equivalent) to libg++/src/builtin.cc. (The first uses getrusage which tek documentation prefers, the second is probably a bit faster) In addition, you should add a paragraph in the README to warn of the potential difficulty for other machines. After porting version 1.35, I took far too long to discover the difficulty, having no road-signs. (ignorable FYI: I have had little difficulty porting to the 4300 system based on Eirik's patches (located at trix.ai.mit.edu), BUT his makefile could sure use some beautification!) ////////////////////////////////////////////////////////////////// //this is the first patch, based on getrusage() 754c754 < #if defined(BSD) || defined(USG) || defined(vax) || defined(sun) || defined(tek4300) --- > #if defined(BSD) || defined(USG) || defined(vax) || defined(sun) 762,765d761 < #else //not USG < #ifdef tek4300 < #include <sys/time.h> < #include <sys/resource.h> 768,769c764 < #endif //tek4300 < #endif //USG --- > #endif 830c825 < #else /*Not a good system for timer calls: dummy them out */ --- > #else /* dummy them out */ 841c836 < #endif //are timer calls ok? --- > #endif ////////////////////////////////////////////////////////////////////// //this is the second patch, based on times() 754c754 < #if defined(BSD) || defined(USG) || defined(vax) || defined(sun) || defined(tek4300) --- > #if defined(BSD) || defined(USG) || defined(vax) || defined(sun) 756,764c756 < #if defined(USG) || defined(tek4300) < #define USGTEK < #endif < < #ifdef tek4300 < #define HZ 60 < #endif < < #ifdef USGTEK --- > #ifdef USG 767d758 < #ifndef tek4300 769d759 < #endif //!tek4300 772c762 < #else //not USGTEK --- > #else 774c764 < #endif //USGTEK --- > #endif 776c766 < #ifdef USGTEK --- > #ifdef USG 783d772 < 789c778 < #ifdef USGTEK --- > #ifdef USG 811c800 < #ifdef USGTEK --- > #ifdef USG 817c806 < #ifdef USGTEK --- > #ifdef USG 826c815 < #ifdef USGTEK --- > #ifdef USG 836c825 < #else /*Not a good system for timer calls: dummy them out */ --- > #else /* dummy them out */ 847,848c836 < #endif //are timer calls ok? < #undef USGTEK --- > #endif Frank Griswold Internet: griswolf@cs.orst.edu Computer Science Dept UUCP: hplabs!hp-pcd!orstcs!griswolf Oregon State University (503) 737-3273 (503) 737-4471