]> git.cworth.org Git - sup/commitdiff
fixed dlopen of libc for os x
authorGrant Hollingworth <grant@antiflux.org>
Thu, 24 Apr 2008 23:10:24 +0000 (19:10 -0400)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Sat, 26 Apr 2008 21:48:49 +0000 (14:48 -0700)
OS X likes to do its own thing.

lib/sup.rb

index c4d1dd5c86bd36e1153784182a60019ece0351b9..afd030fc017698077c7a32ef2dfae72a2f622d59 100644 (file)
@@ -14,7 +14,7 @@ require 'curses'
 require 'dl/import'
 module LibC
   extend DL::Importable
-  dlload "libc.so.6"
+  dlload Config::CONFIG['arch'] =~ /darwin/ ? "libc.dylib" : "libc.so.6"
   extern "void setlocale(int, const char *)"
 end
 LibC.setlocale(6, "")  # LC_ALL == 6