1.0.39.12: remove darwin-langinfo
authorCyrus Harmon <ch-sbcl@bobobeach.com>
Sat, 12 Jun 2010 22:25:31 +0000 (22:25 +0000)
committerCyrus Harmon <ch-sbcl@bobobeach.com>
Sat, 12 Jun 2010 22:25:31 +0000 (22:25 +0000)
 * 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.

contrib/sb-posix/posix-tests.lisp
src/runtime/Config.ppc-darwin
src/runtime/Config.x86-64-darwin
src/runtime/Config.x86-darwin
src/runtime/darwin-langinfo.c [deleted file]
src/runtime/darwin-langinfo.h [deleted file]
tools-for-build/grovel-headers.c
version.lisp-expr

index 549910b..78f99ba 100644 (file)
   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)
index 014657a..92089b5 100644 (file)
@@ -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
index c62c343..d852f4b 100644 (file)
@@ -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
index b05880e..2ee81e1 100644 (file)
@@ -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 (file)
index a655553..0000000
+++ /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 <stdlib.h>
-#include <string.h>
-#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 (file)
index bb96a8a..0000000
+++ /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 */
index de5340d..421f03c 100644 (file)
   #include <sys/wait.h>
   #include <sys/ioctl.h>
   #include <sys/termios.h>
-  #ifdef LISP_FEATURE_DARWIN
-    #include "../src/runtime/darwin-langinfo.h"
-  #else
-    #include <langinfo.h>
-  #endif
+  #include <langinfo.h>
   #ifdef LISP_FEATURE_DLSHIM
     #include "../src/runtime/darwin-dlshim.h"
   #else
index d226d74..6e159a8 100644 (file)
@@ -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"