Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/examples/puffs/pgfs do setlocale so that we can print ...
details: https://anonhg.NetBSD.org/src/rev/a5a596adf65b
branches: trunk
changeset: 786255:a5a596adf65b
user: yamt <yamt%NetBSD.org@localhost>
date: Mon Apr 22 13:27:49 2013 +0000
description:
do setlocale so that we can print localized messages from libpq correctly.
diffstat:
share/examples/puffs/pgfs/mount.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r a30928f5864f -r a5a596adf65b share/examples/puffs/pgfs/mount.c
--- a/share/examples/puffs/pgfs/mount.c Mon Apr 22 13:27:08 2013 +0000
+++ b/share/examples/puffs/pgfs/mount.c Mon Apr 22 13:27:49 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mount.c,v 1.2 2012/04/11 14:25:54 yamt Exp $ */
+/* $NetBSD: mount.c,v 1.3 2013/04/22 13:27:49 yamt Exp $ */
/*-
* Copyright (c)2010,2011 YAMAMOTO Takashi,
@@ -28,11 +28,12 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mount.c,v 1.2 2012/04/11 14:25:54 yamt Exp $");
+__RCSID("$NetBSD: mount.c,v 1.3 2013/04/22 13:27:49 yamt Exp $");
#endif /* not lint */
#include <err.h>
#include <errno.h>
+#include <locale.h>
#include <mntopts.h>
#include <paths.h>
#include <puffs.h>
@@ -78,6 +79,8 @@
bool debug = false;
bool dosync;
+ setlocale(LC_ALL, "");
+
mntflags = 0;
altmntflags = 0;
while ((ch = getopt(argc, argv, "o:")) != -1) {
Home |
Main Index |
Thread Index |
Old Index