Commit | Line | Data |
14bdf8d3 |
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 |
9 | #include <string.h> |
10 | |
11 | char *environ = 0; |
12 | |
14bdf8d3 |
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 | |
3a2f06e9 |
20 | |
14bdf8d3 |
21 | int Perl_my_popen( int a, int b) { |
3a2f06e9 |
22 | return NULL; |
14bdf8d3 |
23 | } |
24 | int Perl_my_pclose( int a) { |
3a2f06e9 |
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; |
14bdf8d3 |
57 | } |
58 | |
3a2f06e9 |
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 | } |
14bdf8d3 |
68 | |
14bdf8d3 |
69 | |