summaryrefslogtreecommitdiff
path: root/epoc/epoc_stubs.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-10 05:27:03 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-10 05:27:03 +0000
commit3a2f06e93704a4187f4ca10ac210246cacbd9b05 (patch)
treee2098523c3499c3b9f0441e69fa72fd71a73907a /epoc/epoc_stubs.c
parent5a3e78123e3b27b54e7f651bd5fa051044f04189 (diff)
downloadperl-3a2f06e93704a4187f4ca10ac210246cacbd9b05.tar.gz
EPOC port update (from Olaf Flebbe <O.Flebbe@science-computing.de>)
p4raw-id: //depot/perl@4782
Diffstat (limited to 'epoc/epoc_stubs.c')
-rw-r--r--epoc/epoc_stubs.c56
1 files changed, 47 insertions, 9 deletions
diff --git a/epoc/epoc_stubs.c b/epoc/epoc_stubs.c
index 02430b7378..b11da400d6 100644
--- a/epoc/epoc_stubs.c
+++ b/epoc/epoc_stubs.c
@@ -6,6 +6,10 @@
*
*/
+#include <string.h>
+
+char *environ = 0;
+
int getgid() {return 0;}
int getegid() {return 0;}
int geteuid() {return 0;}
@@ -13,19 +17,53 @@ int getuid() {return 0;}
int setgid() {return -1;}
int setuid() {return -1;}
+
int Perl_my_popen( int a, int b) {
- return 0;
+ return NULL;
}
int Perl_my_pclose( int a) {
- return 0;
+ return NULL;
+}
+
+int kill() {return -1;}
+signal() { }
+
+int execv() { return -1;}
+int execvp() { return -1;}
+
+void Perl_do_exec() {}
+
+/*------------------------------------------------------------------*/
+/* Two dummy functions implement getproto* */
+/*------------------------------------------------------------------*/
+#include <sys/types.h>
+#include <netdb.h>
+#include <netinet/in.h>
+
+
+static struct protoent protos[2] = {
+ {"tcp", NULL, IPPROTO_TCP} ,
+ {"udp", NULL, IPPROTO_UDP}};
+
+struct protoent *getprotobyname (const char *st) {
+
+ if (!strcmp( st, "tcp")) {
+ return &protos[0];
+ }
+ if (!strcmp( st, "udp")) {
+ return &protos[1];
+ }
+ return NULL;
}
-kill() {}
-signal() {}
+struct protoent *getprotobynumber ( int i) {
+ if (i == IPPROTO_TCP) {
+ return &protos[0];
+ }
+ if (i == IPPROTO_UDP) {
+ return &protos[1];
+ }
+ return NULL;
+}
-void execv() {}
-void execvp() {}
-void do_spawn() {}
-void do_aspawn() {}
-void Perl_do_exec() {}