This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix for failure to match $foo =~ /(?i)/ (from Ilya Zakharevich)
[perl5.git] / epoc / epoc_stubs.c
1 /*
2  *    Copyright (c) 1999 Olaf Flebbe o.flebbe@gmx.de
3  *    
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.
6  *
7  */
8
9 #include <string.h>
10
11 char *environ = 0;
12
13 int getgid() {return 0;}
14 int getegid() {return 0;}
15 int geteuid() {return 0;}
16 int getuid() {return 0;}
17 int setgid() {return -1;}
18 int setuid() {return -1;}
19
20
21 int Perl_my_popen( int a, int b) {
22          return NULL;
23 }
24 int Perl_my_pclose( int a) {
25          return NULL;
26 }
27
28 int kill() {return -1;}
29 signal() { }
30
31 int execv() { return -1;}
32 int execvp() { return -1;}
33
34 void Perl_do_exec() {} 
35
36 /*------------------------------------------------------------------*/
37 /* Two dummy functions implement getproto*                          */
38 /*------------------------------------------------------------------*/
39 #include <sys/types.h>
40 #include <netdb.h>
41 #include <netinet/in.h>
42
43
44 static struct protoent protos[2] = {
45   {"tcp",  NULL, IPPROTO_TCP} ,
46   {"udp",  NULL, IPPROTO_UDP}};
47
48 struct protoent *getprotobyname (const char *st) {
49     
50   if (!strcmp( st, "tcp")) { 
51     return &protos[0];
52   }
53   if (!strcmp( st, "udp")) { 
54     return &protos[1];
55   }
56   return NULL;
57 }
58
59 struct protoent *getprotobynumber ( int i) {
60   if (i == IPPROTO_TCP) {
61      return &protos[0];
62   }
63   if (i == IPPROTO_UDP) {
64     return &protos[1];
65   }
66   return NULL;
67 }
68
69