Permalink
Browse files

Added better support for non-GNU systems.

  • Loading branch information...
1 parent 3567f83 commit 9dad09bcbb23d42235375ef57e2198dfd33b3365 Gustavo Henrique Milaré committed Jan 16, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 gettext-loader.lisp
View
@@ -19,7 +19,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
(in-package :cl-gettext)
-;; (cffi:define-foreign-library gettext
-;; (:unix "libc.so")
-;; (t (:default "libintl")))
-;; (cffi:use-foreign-library gettext)
+(cffi:define-foreign-library gettext
+ (:unix (or "libintl.so"
+ "libintl"))
+ (:windows "libintl.dll")
+ (t (:default "libintl")))
+
+(handler-case (assert (cffi:foreign-funcall "gettext" :string "abc" :string))
+ (error ()
+ (cffi:use-foreign-library gettext)))

0 comments on commit 9dad09b

Please sign in to comment.