develooper Front page | perl.perl6.internals | Postings from July 2002

[perl #15880] [PATCH] generic platform.c should not assume dynaloading

Thread Next
From:
Jarkko Hietaniemi
Date:
July 30, 2002 22:24
Subject:
[perl #15880] [PATCH] generic platform.c should not assume dynaloading
Message ID:
rt-15880-32414.17.6312031501853@perl
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #15880]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=15880 >


I think the generic platform.c should not assume dynamic loading.
This patch helps enough so that UNICOS/mk (which has only static
loading) compiles and tests okay.

diff -ruN parrot/config/gen/platform/generic.c parrot+cast/config/gen/platform/generic.c
--- parrot/config/gen/platform/generic.c	2002-06-10 00:12:42.000000000 +0300
+++ parrot+cast/config/gen/platform/generic.c	2002-07-31 08:02:40.000000000 +0300
@@ -70,7 +70,11 @@
 void *
 Parrot_dlopen(const char *filename)
 {
+#ifdef HAS_DLOPEN
     return dlopen(filename, PARROT_DLOPEN_FLAGS);
+#else
+    return 0;
+#endif
 }
 
 
@@ -81,7 +85,11 @@
 const char *
 Parrot_dlerror(void)
 {
+#ifdef HAS_DLOPEN
     return dlerror();
+#else
+    return 0;
+#endif
 }
 
 
@@ -92,7 +100,11 @@
 void *
 Parrot_dlsym(void *handle, const char *symbol)
 {
+#ifdef HAS_DLOPEN
     return dlsym(handle, symbol);
+#else
+    return 0;
+#endif
 }
 
 
@@ -103,7 +115,11 @@
 int
 Parrot_dlclose(void *handle)
 {
+#ifdef HAS_DLOPEN
     return dlclose(handle);
+#else
+    return -1;
+#endif
 }
 
 /*
diff -ruN parrot/tools/dev/lib_deps.pl parrot+cast/tools/dev/lib_deps.pl
--- parrot/tools/dev/lib_deps.pl	2002-06-08 03:43:54.000000000 +0300
+++ parrot+cast/tools/dev/lib_deps.pl	2002-07-31 08:04:01.000000000 +0300
@@ -330,6 +330,7 @@
 ctime       time.h
 difftime    time.h
 div         stdlib.h
+dlopen      dlfcn.h
 erf         math.h
 erfc        math.h
 erfcf       math.h


-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About