author | llornkcor <llornkcor> | 2005-08-04 07:22:40 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2005-08-04 07:22:40 (UTC) |
commit | 77825e5455872ef0c6def793b38bc767a3838bc0 (patch) (unidiff) | |
tree | adff22adfee3d6a17dd9e0a76ccc51f2a2a20a1f | |
parent | 32743ebb00d374ad18afbed69ab3e94b03699a57 (diff) | |
download | opie-77825e5455872ef0c6def793b38bc767a3838bc0.zip opie-77825e5455872ef0c6def793b38bc767a3838bc0.tar.gz opie-77825e5455872ef0c6def793b38bc767a3838bc0.tar.bz2 |
apply patch in # 0001662, fixes build with uclibc
-rw-r--r-- | core/opie-login/main.cpp | 5 | ||||
-rw-r--r-- | noncore/applets/keyhelper/keyhelperapplet/anylnk/ProcessInvoker.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.cpp | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp index 554efd3..3f1077c 100644 --- a/core/opie-login/main.cpp +++ b/core/opie-login/main.cpp | |||
@@ -122,66 +122,69 @@ int main ( int argc, char **argv ) | |||
122 | } | 122 | } |
123 | } | 123 | } |
124 | int killedbysig = 0; | 124 | int killedbysig = 0; |
125 | userExited=0; | 125 | userExited=0; |
126 | if (WIFEXITED(status)!=0 ) { | 126 | if (WIFEXITED(status)!=0 ) { |
127 | if (WEXITSTATUS(status)==137) { | 127 | if (WEXITSTATUS(status)==137) { |
128 | userExited=1; | 128 | userExited=1; |
129 | } | 129 | } |
130 | } | 130 | } |
131 | 131 | ||
132 | if ( WIFSIGNALED( status )) { | 132 | if ( WIFSIGNALED( status )) { |
133 | switch ( WTERMSIG( status )) { | 133 | switch ( WTERMSIG( status )) { |
134 | case SIGTERM: | 134 | case SIGTERM: |
135 | case SIGINT : | 135 | case SIGINT : |
136 | case SIGKILL: | 136 | case SIGKILL: |
137 | break; | 137 | break; |
138 | 138 | ||
139 | default : | 139 | default : |
140 | killedbysig = WTERMSIG( status ); | 140 | killedbysig = WTERMSIG( status ); |
141 | break; | 141 | break; |
142 | } | 142 | } |
143 | } | 143 | } |
144 | if ( killedbysig ) { // qpe was killed by an uncaught signal | 144 | if ( killedbysig ) { // qpe was killed by an uncaught signal |
145 | qApp = 0; | 145 | qApp = 0; |
146 | 146 | ||
147 | ::syslog ( LOG_ERR, "Opie was killed by a signal #%d", killedbysig ); | 147 | ::syslog ( LOG_ERR, "Opie was killed by a signal #%d", killedbysig ); |
148 | 148 | ||
149 | QWSServer::setDesktopBackground ( QImage ( )); | 149 | QWSServer::setDesktopBackground ( QImage ( )); |
150 | QApplication *app = new QApplication ( argc, argv, QApplication::GuiServer ); | 150 | QApplication *app = new QApplication ( argc, argv, QApplication::GuiServer ); |
151 | app-> setFont ( QFont ( "Helvetica", 10 )); | 151 | app-> setFont ( QFont ( "Helvetica", 10 )); |
152 | app-> setStyle ( new QPEStyle ( )); | 152 | app-> setStyle ( new QPEStyle ( )); |
153 | 153 | ||
154 | // const char *sig = ::strsignal ( killedbysig ); | 154 | #ifndef __UCLIBC__ |
155 | const char *sig = ::sys_siglist[killedbysig]; | 155 | const char *sig = ::sys_siglist[killedbysig]; |
156 | #else | ||
157 | const char *sig = ::strsignal ( killedbysig ); | ||
158 | #endif | ||
156 | QLabel *l = new QLabel ( 0, "sig", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool ); | 159 | QLabel *l = new QLabel ( 0, "sig", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool ); |
157 | l-> setText ( LoginWindowImpl::tr( "Opie was terminated\nby an uncaught signal\n(%1)\n" ). arg ( sig )); | 160 | l-> setText ( LoginWindowImpl::tr( "Opie was terminated\nby an uncaught signal\n(%1)\n" ). arg ( sig )); |
158 | l-> setAlignment ( Qt::AlignCenter ); | 161 | l-> setAlignment ( Qt::AlignCenter ); |
159 | l-> move ( 0, 0 ); | 162 | l-> move ( 0, 0 ); |
160 | l-> resize ( app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( )); | 163 | l-> resize ( app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( )); |
161 | l-> show ( ); | 164 | l-> show ( ); |
162 | QTimer::singleShot ( 3000, app, SLOT( quit())); | 165 | QTimer::singleShot ( 3000, app, SLOT( quit())); |
163 | app-> exec ( ); | 166 | app-> exec ( ); |
164 | delete app; | 167 | delete app; |
165 | qApp = 0; | 168 | qApp = 0; |
166 | } | 169 | } |
167 | } | 170 | } |
168 | else { | 171 | else { |
169 | if ( !autolog ) { | 172 | if ( !autolog ) { |
170 | QString confFile=QPEApplication::qpeDir() + "etc/opie-login.conf"; | 173 | QString confFile=QPEApplication::qpeDir() + "etc/opie-login.conf"; |
171 | Config cfg ( confFile, Config::File ); | 174 | Config cfg ( confFile, Config::File ); |
172 | cfg. setGroup ( "General" ); | 175 | cfg. setGroup ( "General" ); |
173 | QString user = cfg. readEntry ( "AutoLogin" ); | 176 | QString user = cfg. readEntry ( "AutoLogin" ); |
174 | 177 | ||
175 | if ( !user. isEmpty ( )) | 178 | if ( !user. isEmpty ( )) |
176 | autolog = ::strdup ( user. latin1 ( )); | 179 | autolog = ::strdup ( user. latin1 ( )); |
177 | } | 180 | } |
178 | 181 | ||
179 | if ( autolog && !userExited ) { | 182 | if ( autolog && !userExited ) { |
180 | 183 | ||
181 | QWSServer::setDesktopBackground( QImage() ); | 184 | QWSServer::setDesktopBackground( QImage() ); |
182 | ODevice::inst()->setDisplayStatus( true ); | 185 | ODevice::inst()->setDisplayStatus( true ); |
183 | LoginApplication *app = new LoginApplication ( argc, argv, ppid ); | 186 | LoginApplication *app = new LoginApplication ( argc, argv, ppid ); |
184 | LoginApplication::setLoginAs( autolog ); | 187 | LoginApplication::setLoginAs( autolog ); |
185 | 188 | ||
186 | 189 | ||
187 | if ( LoginApplication::changeIdentity ( )) | 190 | if ( LoginApplication::changeIdentity ( )) |
diff --git a/noncore/applets/keyhelper/keyhelperapplet/anylnk/ProcessInvoker.cpp b/noncore/applets/keyhelper/keyhelperapplet/anylnk/ProcessInvoker.cpp index 09605bd..ff06551 100644 --- a/noncore/applets/keyhelper/keyhelperapplet/anylnk/ProcessInvoker.cpp +++ b/noncore/applets/keyhelper/keyhelperapplet/anylnk/ProcessInvoker.cpp | |||
@@ -1,34 +1,38 @@ | |||
1 | #include "ProcessInvoker.h" | 1 | #include "ProcessInvoker.h" |
2 | 2 | ||
3 | #ifndef PIPE_BUF // uClibc or similar | ||
4 | #include <linux/limits.h> | ||
5 | #endif | ||
6 | |||
3 | static ProcessInvoker* g_this; | 7 | static ProcessInvoker* g_this; |
4 | /* ------------------------------------------------------------------------ */ | 8 | /* ------------------------------------------------------------------------ */ |
5 | /* static functions */ | 9 | /* static functions */ |
6 | /* ------------------------------------------------------------------------ */ | 10 | /* ------------------------------------------------------------------------ */ |
7 | 11 | ||
8 | static Sigfunc* setSignalHandler(int signo, Sigfunc* handler) | 12 | static Sigfunc* setSignalHandler(int signo, Sigfunc* handler) |
9 | { | 13 | { |
10 | struct sigaction act,oact; | 14 | struct sigaction act,oact; |
11 | 15 | ||
12 | act.sa_handler = handler; | 16 | act.sa_handler = handler; |
13 | ::sigemptyset(&act.sa_mask); | 17 | ::sigemptyset(&act.sa_mask); |
14 | act.sa_flags = 0; | 18 | act.sa_flags = 0; |
15 | #ifdefSA_RESTART | 19 | #ifdefSA_RESTART |
16 | act.sa_flags |= SA_RESTART; | 20 | act.sa_flags |= SA_RESTART; |
17 | #endif | 21 | #endif |
18 | if(::sigaction(signo, &act, &oact) < 0){ | 22 | if(::sigaction(signo, &act, &oact) < 0){ |
19 | return(NULL); | 23 | return(NULL); |
20 | } | 24 | } |
21 | return(oact.sa_handler); | 25 | return(oact.sa_handler); |
22 | } | 26 | } |
23 | 27 | ||
24 | static void childHandler(int /*signo*/) | 28 | static void childHandler(int /*signo*/) |
25 | { | 29 | { |
26 | pid_t pid; | 30 | pid_t pid; |
27 | int status; | 31 | int status; |
28 | while((pid = ::waitpid(-1, &status, WNOHANG)) > 0){ | 32 | while((pid = ::waitpid(-1, &status, WNOHANG)) > 0){ |
29 | if(pid == g_this->m_child){ | 33 | if(pid == g_this->m_child){ |
30 | g_this->notifyFinish(status); | 34 | g_this->notifyFinish(status); |
31 | } | 35 | } |
32 | } | 36 | } |
33 | } | 37 | } |
34 | 38 | ||
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp index ac6e1fa..8de9aa1 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.cpp +++ b/noncore/settings/sysinfo/benchmarkinfo.cpp | |||
@@ -21,65 +21,65 @@ | |||
21 | /* OPIE */ | 21 | /* OPIE */ |
22 | #include <opie2/odebug.h> | 22 | #include <opie2/odebug.h> |
23 | #include <opie2/ostorageinfo.h> | 23 | #include <opie2/ostorageinfo.h> |
24 | #include <opie2/olistview.h> | 24 | #include <opie2/olistview.h> |
25 | #include <opie2/oresource.h> | 25 | #include <opie2/oresource.h> |
26 | #include <qpe/qpeapplication.h> | 26 | #include <qpe/qpeapplication.h> |
27 | #include <qpe/qcopenvelope_qws.h> | 27 | #include <qpe/qcopenvelope_qws.h> |
28 | #include <qpe/qpedecoration_qws.h> | 28 | #include <qpe/qpedecoration_qws.h> |
29 | #include <qpe/config.h> | 29 | #include <qpe/config.h> |
30 | using namespace Opie::Core; | 30 | using namespace Opie::Core; |
31 | using namespace Opie::Ui; | 31 | using namespace Opie::Ui; |
32 | 32 | ||
33 | /* QT */ | 33 | /* QT */ |
34 | #include <qclipboard.h> | 34 | #include <qclipboard.h> |
35 | #include <qcolor.h> | 35 | #include <qcolor.h> |
36 | #include <qcombobox.h> | 36 | #include <qcombobox.h> |
37 | #include <qdirectpainter_qws.h> | 37 | #include <qdirectpainter_qws.h> |
38 | #include <qfile.h> | 38 | #include <qfile.h> |
39 | #include <qtextstream.h> | 39 | #include <qtextstream.h> |
40 | #include <qfiledialog.h> | 40 | #include <qfiledialog.h> |
41 | #include <qlabel.h> | 41 | #include <qlabel.h> |
42 | #include <qlayout.h> | 42 | #include <qlayout.h> |
43 | #include <qpainter.h> | 43 | #include <qpainter.h> |
44 | #include <qpushbutton.h> | 44 | #include <qpushbutton.h> |
45 | #include <qtimer.h> | 45 | #include <qtimer.h> |
46 | #include <qwhatsthis.h> | 46 | #include <qwhatsthis.h> |
47 | 47 | ||
48 | /* STD */ | 48 | /* STD */ |
49 | #include <time.h> | 49 | #include <time.h> |
50 | #include <stdio.h> | 50 | #include <stdio.h> |
51 | #include <stdlib.h> | 51 | #include <stdlib.h> |
52 | #include <math.h> | 52 | #include <math.h> |
53 | #if defined (__GNUC__) && (__GNUC__ < 3) | 53 | #if (defined (__GNUC__) && (__GNUC__ < 3)) || defined(__UCLIBC__) |
54 | #define round qRound | 54 | #define round qRound |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | extern "C" | 57 | extern "C" |
58 | { | 58 | { |
59 | void BenchFFT( void ); | 59 | void BenchFFT( void ); |
60 | double dhry_main( int ); | 60 | double dhry_main( int ); |
61 | } | 61 | } |
62 | 62 | ||
63 | #define DHRYSTONE_RUNS 20000000 | 63 | #define DHRYSTONE_RUNS 20000000 |
64 | #define TEST_DURATION 3 | 64 | #define TEST_DURATION 3 |
65 | 65 | ||
66 | //=========================================================================== | 66 | //=========================================================================== |
67 | 67 | ||
68 | class BenchmarkPaintWidget : public QWidget | 68 | class BenchmarkPaintWidget : public QWidget |
69 | { | 69 | { |
70 | public: | 70 | public: |
71 | BenchmarkPaintWidget() : QWidget( 0, "Benchmark Paint Widget", WStyle_Customize|WStyle_StaysOnTop|WPaintUnclipped|WPaintClever ) | 71 | BenchmarkPaintWidget() : QWidget( 0, "Benchmark Paint Widget", WStyle_Customize|WStyle_StaysOnTop|WPaintUnclipped|WPaintClever ) |
72 | { | 72 | { |
73 | resize( QApplication::desktop()->size() ); | 73 | resize( QApplication::desktop()->size() ); |
74 | show(); | 74 | show(); |
75 | p.begin( this ); | 75 | p.begin( this ); |
76 | }; | 76 | }; |
77 | 77 | ||
78 | ~BenchmarkPaintWidget() | 78 | ~BenchmarkPaintWidget() |
79 | { | 79 | { |
80 | p.end(); | 80 | p.end(); |
81 | hide(); | 81 | hide(); |
82 | }; | 82 | }; |
83 | 83 | ||
84 | QPainter p; | 84 | QPainter p; |
85 | }; | 85 | }; |