author | sandman <sandman> | 2002-10-14 01:17:39 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-14 01:17:39 (UTC) |
commit | 2c2d282f3d665035300873bddab6e64c843ebc0e (patch) (unidiff) | |
tree | efcab6d90f6529234b6c03cd4589b9fa868cd3a2 | |
parent | 1b8d2ecee642bdecfdc3be15625f2c53bab01e64 (diff) | |
download | opie-2c2d282f3d665035300873bddab6e64c843ebc0e.zip opie-2c2d282f3d665035300873bddab6e64c843ebc0e.tar.gz opie-2c2d282f3d665035300873bddab6e64c843ebc0e.tar.bz2 |
include fix for ipaq/zaurus compile
-rw-r--r-- | core/opie-login/main.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp index 2c10f77..8f795e3 100644 --- a/core/opie-login/main.cpp +++ b/core/opie-login/main.cpp | |||
@@ -6,96 +6,97 @@ | |||
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .> <`_, > . <= redistribute it and/or modify it under |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | .="- .-=="i, .._ License as published by the Free Software |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | - . .-<_> .<> Foundation; either version 2 of the License, |
10 | ._= =} : or (at your option) any later version. | 10 | ._= =} : or (at your option) any later version. |
11 | .%`+i> _;_. | 11 | .%`+i> _;_. |
12 | .i_,=:_. -<s. This file is distributed in the hope that | 12 | .i_,=:_. -<s. This file is distributed in the hope that |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
14 | : .. .:, . . . without even the implied warranty of | 14 | : .. .:, . . . without even the implied warranty of |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
17 | ..}^=.= = ; Public License for more details. | 17 | ..}^=.= = ; Public License for more details. |
18 | ++= -. .` .: | 18 | ++= -. .` .: |
19 | : = ...= . :.=- You should have received a copy of the GNU | 19 | : = ...= . :.=- You should have received a copy of the GNU |
20 | -. .:....=;==+<; General Public License along with this file; | 20 | -. .:....=;==+<; General Public License along with this file; |
21 | -_. . . )=. = see the file COPYING. If not, write to the | 21 | -_. . . )=. = see the file COPYING. If not, write to the |
22 | -- :-=` Free Software Foundation, Inc., | 22 | -- :-=` Free Software Foundation, Inc., |
23 | 59 Temple Place - Suite 330, | 23 | 59 Temple Place - Suite 330, |
24 | Boston, MA 02111-1307, USA. | 24 | Boston, MA 02111-1307, USA. |
25 | 25 | ||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #define _GNU_SOURCE | 28 | #define _GNU_SOURCE |
29 | 29 | ||
30 | #include <sys/types.h> | 30 | #include <sys/types.h> |
31 | #include <time.h> | 31 | #include <time.h> |
32 | #include <sys/time.h> | 32 | #include <sys/time.h> |
33 | #include <sys/resource.h> | 33 | #include <sys/resource.h> |
34 | #include <unistd.h> | 34 | #include <unistd.h> |
35 | #include <syslog.h> | 35 | #include <syslog.h> |
36 | #include <sys/wait.h> | 36 | #include <sys/wait.h> |
37 | #include <stdio.h> | 37 | #include <stdio.h> |
38 | #include <stdlib.h> | 38 | #include <stdlib.h> |
39 | #include <signal.h> | 39 | #include <signal.h> |
40 | #include <getopt.h> | 40 | #include <getopt.h> |
41 | #include <string.h> | 41 | #include <string.h> |
42 | 42 | ||
43 | #include <qpe/qpeapplication.h> | 43 | #include <qpe/qpeapplication.h> |
44 | #include <qpe/qcopenvelope_qws.h> | 44 | #include <qpe/qcopenvelope_qws.h> |
45 | #include <qpe/qpestyle.h> | 45 | #include <qpe/qpestyle.h> |
46 | #include <qpe/power.h> | 46 | #include <qpe/power.h> |
47 | 47 | ||
48 | #include <opie/odevice.h> | 48 | #include <opie/odevice.h> |
49 | 49 | ||
50 | #include <qwindowsystem_qws.h> | 50 | #include <qwindowsystem_qws.h> |
51 | #include <qmessagebox.h> | 51 | #include <qmessagebox.h> |
52 | #include <qlabel.h> | 52 | #include <qlabel.h> |
53 | #include <qtimer.h> | 53 | #include <qtimer.h> |
54 | #include <qfile.h> | ||
54 | 55 | ||
55 | #include "loginapplication.h" | 56 | #include "loginapplication.h" |
56 | #include "loginwindowimpl.h" | 57 | #include "loginwindowimpl.h" |
57 | #include "calibrate.h" | 58 | #include "calibrate.h" |
58 | 59 | ||
59 | using namespace Opie; | 60 | using namespace Opie; |
60 | 61 | ||
61 | int login_main ( int argc, char **argv ); | 62 | int login_main ( int argc, char **argv ); |
62 | void sigterm ( int sig ); | 63 | void sigterm ( int sig ); |
63 | void exit_closelog ( ); | 64 | void exit_closelog ( ); |
64 | 65 | ||
65 | static struct option long_options [] = { | 66 | static struct option long_options [] = { |
66 | { "autologin", 1, 0, 'a' }, | 67 | { "autologin", 1, 0, 'a' }, |
67 | { 0, 0, 0, 0 } | 68 | { 0, 0, 0, 0 } |
68 | }; | 69 | }; |
69 | 70 | ||
70 | 71 | ||
71 | int main ( int argc, char **argv ) | 72 | int main ( int argc, char **argv ) |
72 | { | 73 | { |
73 | if ( ::geteuid ( ) != 0 ) { | 74 | if ( ::geteuid ( ) != 0 ) { |
74 | ::fprintf ( stderr, "%s can only be executed by root. (or chmod +s)", argv [0] ); | 75 | ::fprintf ( stderr, "%s can only be executed by root. (or chmod +s)", argv [0] ); |
75 | return 1; | 76 | return 1; |
76 | } | 77 | } |
77 | if ( ::getuid ( ) != 0 ) // qt doesn't really like SUID and | 78 | if ( ::getuid ( ) != 0 ) // qt doesn't really like SUID and |
78 | ::setuid ( 0 ); // messes up things like config files | 79 | ::setuid ( 0 ); // messes up things like config files |
79 | 80 | ||
80 | char *autolog = 0; | 81 | char *autolog = 0; |
81 | int c; | 82 | int c; |
82 | while (( c = ::getopt_long ( argc, argv, "a:", long_options, 0 )) != -1 ) { | 83 | while (( c = ::getopt_long ( argc, argv, "a:", long_options, 0 )) != -1 ) { |
83 | switch ( c ) { | 84 | switch ( c ) { |
84 | case 'a': | 85 | case 'a': |
85 | autolog = optarg; | 86 | autolog = optarg; |
86 | break; | 87 | break; |
87 | default: | 88 | default: |
88 | ::fprintf ( stderr, "Usage: %s [-a|--autologin=<user>]\n", argv [0] ); | 89 | ::fprintf ( stderr, "Usage: %s [-a|--autologin=<user>]\n", argv [0] ); |
89 | return 2; | 90 | return 2; |
90 | } | 91 | } |
91 | } | 92 | } |
92 | 93 | ||
93 | //struct rlimit rl; | 94 | //struct rlimit rl; |
94 | //::getrlimit ( RLIMIT_NOFILE, &rl ); | 95 | //::getrlimit ( RLIMIT_NOFILE, &rl ); |
95 | 96 | ||
96 | //for ( unsigned int i = 0; i < rl. rlim_cur; i++ ) | 97 | //for ( unsigned int i = 0; i < rl. rlim_cur; i++ ) |
97 | // ::close ( i ); | 98 | // ::close ( i ); |
98 | 99 | ||
99 | ::setpgid ( 0, 0 ); | 100 | ::setpgid ( 0, 0 ); |
100 | ::setsid ( ); | 101 | ::setsid ( ); |
101 | 102 | ||