This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mark link type of exported functions for OS/2
authorIlya Zakharevich <ilya@math.berkeley.edu>
Sun, 26 Jul 1998 21:03:03 +0000 (17:03 -0400)
committerGurusamy Sarathy <gsar@cpan.org>
Sun, 2 Aug 1998 06:22:15 +0000 (06:22 +0000)
Message-Id: <199807270103.VAA04977@monk.mps.ohio-state.edu>
Subject: Re: Compiler linkage's types [PATCH 5.005]

p4raw-id: //depot/maint-5.005/perl@1702

os2/os2ish.h
proto.h

index c02202a..586f75b 100644 (file)
@@ -169,11 +169,16 @@ void Perl_OS2_init(char **);
 
 /* XXX This code hideously puts env inside: */
 
-#define PERL_SYS_INIT(argcp, argvp) STMT_START {       \
+#ifdef __EMX__
+#  define PERL_SYS_INIT(argcp, argvp) STMT_START {     \
     _response(argcp, argvp);                   \
     _wildcard(argcp, argvp);                   \
     Perl_OS2_init(env);        } STMT_END
-
+#else  /* Compiling embedded Perl with non-EMX compiler */
+#  define PERL_SYS_INIT(argcp, argvp) STMT_START {     \
+    Perl_OS2_init(env);        } STMT_END
+#  define PERL_CALLCONV _System
+#endif
 #define PERL_SYS_TERM()                MALLOC_TERM
 
 /* #define PERL_SYS_TERM() STMT_START {        \
diff --git a/proto.h b/proto.h
index 5da657b..1b98675 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -1,7 +1,11 @@
+#ifndef PERL_CALLCONV
+#  define PERL_CALLCONV
+#endif 
+
 #ifdef PERL_OBJECT
-#define VIRTUAL virtual
+#define VIRTUAL virtual PERL_CALLCONV
 #else
-#define VIRTUAL
+#define VIRTUAL PERL_CALLCONV
 START_EXTERN_C
 #endif