From: Cyrus Harmon Date: Sat, 12 Jun 2010 22:25:31 +0000 (+0000) Subject: 1.0.39.12: remove darwin-langinfo X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=7c75cd363da90afe334e936aad2b63437ea5905d;p=sbcl.git 1.0.39.12: remove darwin-langinfo * remove darwin-langinfo.c/h from Config.*-darwin and grovel-headers.c * revert explicit setting of *default-c-string-external-format* to latin-1 in sb-posix test. --- diff --git a/contrib/sb-posix/posix-tests.lisp b/contrib/sb-posix/posix-tests.lisp index 549910b..78f99ba 100644 --- a/contrib/sb-posix/posix-tests.lisp +++ b/contrib/sb-posix/posix-tests.lisp @@ -508,8 +508,7 @@ nil) (deftest readdir.1 - (let ((dir (sb-posix:opendir "/")) - (sb-alien::*default-c-string-external-format* :latin-1)) + (let ((dir (sb-posix:opendir "/"))) (unwind-protect (block dir-loop (loop for dirent = (sb-posix:readdir dir) diff --git a/src/runtime/Config.ppc-darwin b/src/runtime/Config.ppc-darwin index 014657a..92089b5 100644 --- a/src/runtime/Config.ppc-darwin +++ b/src/runtime/Config.ppc-darwin @@ -12,7 +12,7 @@ CFLAGS = -g -Wall -O2 -fdollars-in-identifiers -mmacosx-version-min=10.4 LINKFLAGS += -mmacosx-version-min=10.4 -OS_SRC = bsd-os.c darwin-os.c ppc-darwin-os.c darwin-langinfo.c +OS_SRC = bsd-os.c darwin-os.c ppc-darwin-os.c ifdef LISP_FEATURE_DLSHIM OS_SRC += darwin-dlshim.c endif diff --git a/src/runtime/Config.x86-64-darwin b/src/runtime/Config.x86-64-darwin index c62c343..d852f4b 100644 --- a/src/runtime/Config.x86-64-darwin +++ b/src/runtime/Config.x86-64-darwin @@ -21,7 +21,7 @@ ifdef LISP_FEATURE_INODE64 CFLAGS += -D_DARWIN_USE_64_BIT_INODE endif -OS_SRC = bsd-os.c x86-64-bsd-os.c darwin-os.c x86-64-darwin-os.c darwin-langinfo.c +OS_SRC = bsd-os.c x86-64-bsd-os.c darwin-os.c x86-64-darwin-os.c ifdef LISP_FEATURE_DLSHIM OS_SRC += darwin-dlshim.c endif diff --git a/src/runtime/Config.x86-darwin b/src/runtime/Config.x86-darwin index b05880e..2ee81e1 100644 --- a/src/runtime/Config.x86-darwin +++ b/src/runtime/Config.x86-darwin @@ -19,7 +19,7 @@ CFLAGS += -mmacosx-version-min=10.4 LINKFLAGS += -mmacosx-version-min=10.4 endif -OS_SRC = bsd-os.c x86-bsd-os.c darwin-os.c x86-darwin-os.c darwin-langinfo.c +OS_SRC = bsd-os.c x86-bsd-os.c darwin-os.c x86-darwin-os.c ifdef LISP_FEATURE_DLSHIM OS_SRC += darwin-dlshim.c endif diff --git a/src/runtime/darwin-langinfo.c b/src/runtime/darwin-langinfo.c deleted file mode 100644 index a655553..0000000 --- a/src/runtime/darwin-langinfo.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This is a minimal nl_langinfo replacement that only handles CODESET. - * By default, it returns UTF-8. It checks if LC_CTYPE or LANG are set, and - * uses LATIN-1 if it finds one set to C, or UTF-8 if it finds one set to - * anything else. - */ - -/* - * This software is part of the SBCL system. See the README file for - * more information. - * - * This software is derived from the CMU CL system, which was - * written at Carnegie Mellon University and released into the - * public domain. The software is in the public domain and is - * provided with absolutely no warranty. See the COPYING and CREDITS - * files for more information. - */ - -#include -#include -#include "darwin-langinfo.h" - -char *nl_langinfo(nl_item item) -{ - char *nada = "", *utf8 = "UTF-8", *latin1 = "LATIN-1"; - - if (item != CODESET) { - return nada; - } else { - char *ctype = getenv ("LC_CTYPE"); - - if ((ctype != NULL) && (!strcmp(ctype, "C"))) { - return latin1; - } else if (ctype != NULL) { - return utf8; - } else { - char *lang = getenv ("LANG"); - - if ((lang != NULL) && (!strcmp(lang, "C"))) { - return latin1; - } else { - return utf8; - } - } - } -} diff --git a/src/runtime/darwin-langinfo.h b/src/runtime/darwin-langinfo.h deleted file mode 100644 index bb96a8a..0000000 --- a/src/runtime/darwin-langinfo.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * This software is part of the SBCL system. See the README file for - * more information. - * - * This software is derived from the CMU CL system, which was - * written at Carnegie Mellon University and released into the - * public domain. The software is in the public domain and is - * provided with absolutely no warranty. See the COPYING and CREDITS - * files for more information. - */ - -#ifndef PPC_DARWIN_LANGINFO_H -#define PPC_DARWIN_LANGINFO_H - -#define CODESET 49 - -typedef int nl_item; -char *nl_langinfo (nl_item); - -#endif /* PPC_DARWIN_LANGINFO_H */ diff --git a/tools-for-build/grovel-headers.c b/tools-for-build/grovel-headers.c index de5340d..421f03c 100644 --- a/tools-for-build/grovel-headers.c +++ b/tools-for-build/grovel-headers.c @@ -36,11 +36,7 @@ #include #include #include - #ifdef LISP_FEATURE_DARWIN - #include "../src/runtime/darwin-langinfo.h" - #else - #include - #endif + #include #ifdef LISP_FEATURE_DLSHIM #include "../src/runtime/darwin-dlshim.h" #else diff --git a/version.lisp-expr b/version.lisp-expr index d226d74..6e159a8 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.39.11" +"1.0.39.12"