Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Sep 2015 17:57:01 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r287791 - stable/10/bin/rm
Message-ID:  <201509141757.t8EHv1uM092120@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Mon Sep 14 17:57:01 2015
New Revision: 287791
URL: https://svnweb.freebsd.org/changeset/base/287791

Log:
  MFC r287237: Respect locale settings.

Modified:
  stable/10/bin/rm/rm.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/rm/rm.c
==============================================================================
--- stable/10/bin/rm/rm.c	Mon Sep 14 17:40:57 2015	(r287790)
+++ stable/10/bin/rm/rm.c	Mon Sep 14 17:57:01 2015	(r287791)
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
 #include <fcntl.h>
 #include <fts.h>
 #include <grp.h>
+#include <locale.h>
 #include <pwd.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -86,6 +87,8 @@ main(int argc, char *argv[])
 	int ch;
 	char *p;
 
+	(void)setlocale(LC_ALL, "");
+
 	/*
 	 * Test for the special case where the utility is called as
 	 * "unlink", for which the functionality provided is greatly



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509141757.t8EHv1uM092120>