Commit | Line | Data |
---|---|---|
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 | ||
14bdf8d3 OF |
11 | int getgid() {return 0;} |
12 | int getegid() {return 0;} | |
13 | int geteuid() {return 0;} | |
14 | int getuid() {return 0;} | |
15 | int setgid() {return -1;} | |
16 | int setuid() {return -1;} | |
17 | ||
3a2f06e9 | 18 | |
14bdf8d3 | 19 | int Perl_my_popen( int a, int b) { |
3a2f06e9 | 20 | return NULL; |
14bdf8d3 OF |
21 | } |
22 | int Perl_my_pclose( int a) { | |
3a2f06e9 GS |
23 | return NULL; |
24 | } | |
25 | ||
26 | int kill() {return -1;} | |
27 | signal() { } | |
28 | ||
29 | int execv() { return -1;} | |
30 | int execvp() { return -1;} | |
31 | ||
ed79a026 | 32 | void Perl_do_exec() {} |
3a2f06e9 GS |
33 | |
34 | /*------------------------------------------------------------------*/ | |
35 | /* Two dummy functions implement getproto* */ | |
36 | /*------------------------------------------------------------------*/ | |
37 | #include <sys/types.h> | |
38 | #include <netdb.h> | |
39 | #include <netinet/in.h> | |
40 | ||
41 | ||
42 | static struct protoent protos[2] = { | |
43 | {"tcp", NULL, IPPROTO_TCP} , | |
44 | {"udp", NULL, IPPROTO_UDP}}; | |
45 | ||
46 | struct protoent *getprotobyname (const char *st) { | |
47 | ||
48 | if (!strcmp( st, "tcp")) { | |
49 | return &protos[0]; | |
50 | } | |
51 | if (!strcmp( st, "udp")) { | |
52 | return &protos[1]; | |
53 | } | |
54 | return NULL; | |
14bdf8d3 OF |
55 | } |
56 | ||
3a2f06e9 GS |
57 | struct protoent *getprotobynumber ( int i) { |
58 | if (i == IPPROTO_TCP) { | |
59 | return &protos[0]; | |
60 | } | |
61 | if (i == IPPROTO_UDP) { | |
62 | return &protos[1]; | |
63 | } | |
64 | return NULL; | |
65 | } | |
14bdf8d3 | 66 | |
14bdf8d3 | 67 |