This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Old hosts like NeXT Classic don't have sort -k,
[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 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
18
19 int Perl_my_popen( int a, int b) {
20          return NULL;
21 }
22 int Perl_my_pclose( int a) {
23          return NULL;
24 }
25
26 int kill() {return -1;}
27 signal() { }
28
29 int execv() { return -1;}
30 int execvp() { return -1;}
31
32 void Perl_do_exec() {}
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;
55 }
56
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 }
66
67