This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: perl@12605 on VMS, [minor PATCH enclosed]
[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
14bdf8d3
OF
11int getgid() {return 0;}
12int getegid() {return 0;}
13int geteuid() {return 0;}
14int getuid() {return 0;}
15int setgid() {return -1;}
16int setuid() {return -1;}
17
3a2f06e9 18
14bdf8d3 19int Perl_my_popen( int a, int b) {
3a2f06e9 20 return NULL;
14bdf8d3
OF
21}
22int Perl_my_pclose( int a) {
3a2f06e9
GS
23 return NULL;
24}
25
26int kill() {return -1;}
27signal() { }
28
29int execv() { return -1;}
30int execvp() { return -1;}
31
ed79a026 32void 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
42static struct protoent protos[2] = {
43 {"tcp", NULL, IPPROTO_TCP} ,
44 {"udp", NULL, IPPROTO_UDP}};
45
46struct 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
57struct 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