2 * Copyright (c) 1999 Olaf Flebbe o.flebbe@gmx.de
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Artistic License, as specified in the README file.
12 #include <sys/unistd.h>
16 Perl_epoc_init(int *argcp, char ***argvp) {
19 char **lastcp = (*argvp);
21 for (i=0; i< *argcp; i++) {
23 if (*((*argvp)[i]) == '<') {
24 if (strlen((*argvp)[i]) > 1) {
30 freopen( ptr, "r", stdin);
31 } else if (*((*argvp)[i]) == '>') {
32 if (strlen((*argvp)[i]) > 1) {
38 freopen( ptr, "w", stdout);
39 } else if ((*((*argvp)[i]) == '2') && (*(((*argvp)[i])+1) == '>')) {
40 if (strcmp( (*argvp)[i], "2>&1") == 0) {
41 dup2( fileno( stdout), fileno( stderr));
43 if (strlen((*argvp)[i]) > 2) {
49 freopen( ptr, "w", stderr);
52 *lastcp++ = (*argvp)[i];
63 /* Symbian forgot to include __fixunsdfi into the MARM euser.lib */
64 /* This is from libgcc2.c , gcc-2.7.2.3 */
66 typedef unsigned int UQItype __attribute__ ((mode (QI)));
67 typedef int SItype __attribute__ ((mode (SI)));
68 typedef unsigned int USItype __attribute__ ((mode (SI)));
69 typedef int DItype __attribute__ ((mode (DI)));
70 typedef unsigned int UDItype __attribute__ ((mode (DI)));
72 typedef float SFtype __attribute__ ((mode (SF)));
73 typedef float DFtype __attribute__ ((mode (DF)));
77 extern DItype __fixunssfdi (SFtype a);
78 extern DItype __fixunsdfdi (DFtype a);
85 if (a >= - (DFtype) (- 2147483647L -1) )
86 return (SItype) (a + (- 2147483647L -1) ) - (- 2147483647L -1) ;