develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35452 - trunk/examples/nci

From:
chromatic
Date:
January 12, 2009 11:43
Subject:
[svn:parrot] r35452 - trunk/examples/nci
Message ID:
20090112194230.1B310CB9F9@x12.develooper.com
Author: chromatic
Date: Mon Jan 12 11:42:29 2009
New Revision: 35452

Modified:
   trunk/examples/nci/ls.pir

Log:
[examples] Fixed NCI ls example not to rely on the POSIXly-correct behavior of
dlopen NULL to get a handle to the current process image.  Only sane operating
systems support this, which is a problem because two of our target platforms
are not sane with respect to this standard POSIX behavior.  Try to guess which
ones!

Modified: trunk/examples/nci/ls.pir
==============================================================================
--- trunk/examples/nci/ls.pir	(original)
+++ trunk/examples/nci/ls.pir	Mon Jan 12 11:42:29 2009
@@ -16,7 +16,7 @@
      .local pmc opendir
      .local pmc readdir
      .local pmc closedir
-     null libc
+     libc = loadlib 'libc'
      dlfunc opendir, libc, 'opendir', 'pt'
      dlfunc readdir, libc, 'readdir', 'pp'
      dlfunc closedir, libc, 'closedir', 'ip'



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