components/tcsh/patches/003.locale.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 2494 c2dd5561bf4f
child 5271 195e24ffa71a
permissions -rw-r--r--
Close of build 10.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2494
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
     1
--- tcsh-6.18.01/configure.in.orig	Wed Sep  5 11:52:15 2012
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
     2
+++ tcsh-6.18.01/configure.in	Wed Sep  5 11:52:40 2012
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
     3
@@ -303,7 +303,6 @@
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
     4
 AC_SEARCH_LIBS(gethostbyname, nsl)
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
     5
 AC_SEARCH_LIBS(connect, socket)
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
     6
 AC_SEARCH_LIBS(catgets, catgets)
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
     7
-AM_ICONV
94
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     8
 
2494
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
     9
 dnl Checks for header files
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    10
 AC_CHECK_HEADERS([auth.h crypt.h features.h inttypes.h paths.h] dnl
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    11
--- tcsh-6.18.01/Makefile.in.orig	Wed Sep  5 11:56:12 2012
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    12
+++ tcsh-6.18.01/Makefile.in	Wed Sep  5 11:57:51 2012
94
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    13
@@ -12,6 +12,7 @@
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    14
 BUILD=tcsh$(EXEEXT)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    15
 [email protected]@
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    16
 [email protected]@
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    17
[email protected]@
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    18
 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    19
 ################################################################
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    20
 ## CFLAGS.  For various -D things, see config.h
2494
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    21
@@ -145,6 +146,7 @@
94
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    22
 #DFLAGS=-D_PATH_TCSHELL='"${DESTBIN}/tcsh"'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    23
 ## The following is set by autoconf.
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    24
 DFLAGS = -D_PATH_TCSHELL='"${bindir}/tcsh"' @[email protected] @[email protected]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    25
+DFLAGS += -DLOCALEDIR='"${localedir}"'
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    26
 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    27
 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    28
 ################################################################
2494
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    29
@@ -296,7 +298,7 @@
94
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    30
 #
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    31
 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    32
 EXTRAFLAGS = @[email protected] $(AFSDEF)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    33
-EXTRALIBS = @[email protected] $(AFSLIB) @[email protected]
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    34
+EXTRALIBS = @[email protected] $(AFSLIB)
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    35
 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    36
 
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    37
 
2494
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    38
--- tcsh-6.18.01/sh.c.orig	Thu Nov 15 14:26:18 2012
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    39
+++ tcsh-6.18.01/sh.c	Thu Nov 15 14:26:37 2012
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    40
@@ -175,17 +175,10 @@
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    41
     size_t len;
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    42
     int add_LOC = 1;
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    43
     int add_lang = 1;
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    44
-    char trypath[MAXPATHLEN];
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    45
-    struct stat st;
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    46
 
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    47
     if (path == NULL)
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    48
         return;
94
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    49
 
2494
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    50
-    (void) xsnprintf(trypath, sizeof(trypath), "%s/en/LC_MESSAGES/tcsh.cat",
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    51
-	path);
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    52
-    if (stat(trypath, &st) == -1)
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    53
-	return;
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    54
-
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    55
     if ((old = getenv("NLSPATH")) != NULL)
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    56
         len = strlen(old) + 1;	/* don't forget the colon. */
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    57
     else
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    58
--- tcsh-6.18.01/sh.func.c.orig	Mon Dec  3 13:09:33 2012
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    59
+++ tcsh-6.18.01/sh.func.c	Mon Dec  3 13:09:54 2012
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    60
@@ -2627,6 +2627,8 @@
94
e2364cad23ff 7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    61
 
2494
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    62
     if (adrof(STRcatalog) != NULL)
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    63
 	catalog = xasprintf("tcsh.%s", short2str(varval(STRcatalog)));
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    64
+/* for compatibility */
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    65
+#undef NL_CAT_LOCALE
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    66
 #ifdef NL_CAT_LOCALE /* POSIX-compliant. */
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    67
     /*
c2dd5561bf4f 15949286 update tcsh to 6.18.01
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 115
diff changeset
    68
      * Check if LC_MESSAGES is set in the environment and use it, if so.