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
CommitLineData
14bdf8d3
OF
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
3a2f06e9
GS
9#include <string.h>
10
11char *environ = 0;
12
14bdf8d3
OF
13int getgid() {return 0;}
14int getegid() {return 0;}
15int geteuid() {return 0;}
16int getuid() {return 0;}
17int setgid() {return -1;}
18int setuid() {return -1;}
19
3a2f06e9 20
14bdf8d3 21int Perl_my_popen( int a, int b) {
3a2f06e9 22 return NULL;
14bdf8d3
OF
23}
24int Perl_my_pclose( int a) {
3a2f06e9
GS
25 return NULL;
26}
27
28int kill() {return -1;}
29signal() { }
30
31int execv() { return -1;}
32int execvp() { return -1;}
33
34void 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
44static struct protoent protos[2] = {
45 {"tcp", NULL, IPPROTO_TCP} ,
46 {"udp", NULL, IPPROTO_UDP}};
47
48struct 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;
14bdf8d3
OF
57}
58
3a2f06e9
GS
59struct 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}
14bdf8d3 68
14bdf8d3 69