From 9f86fab6af15168734ce81e4f93c3576dd360352 Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Sun, 17 Apr 2016 10:59:34 -0500 Subject: Add new localedef(1) stub --- Makefile | 6 +++++- localedef/Makefile | 14 ++++++++++++++ localedef/localedef.1 | 39 +++++++++++++++++++++++++++++++++++++++ localedef/localedef.c | 4 ++++ 4 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 localedef/Makefile create mode 100644 localedef/localedef.1 create mode 100644 localedef/localedef.c diff --git a/Makefile b/Makefile index 54200fb..26b890c 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,13 @@ .POSIX: -all: getconf/getconf +all: getconf/getconf localedef/localedef getconf/getconf: cd getconf && $(MAKE) +localedef/localedef: + cd localedef && ${MAKE} + clean: cd getconf && $(MAKE) clean @@ -12,3 +15,4 @@ install: mkdir -p $(DESTDIR)/usr/bin mkdir -p $(DESTDIR)/usr/share/man/man1 cd getconf && $(MAKE) install + cd localedef && $(MAKE) install diff --git a/localedef/Makefile b/localedef/Makefile new file mode 100644 index 0000000..1cc2083 --- /dev/null +++ b/localedef/Makefile @@ -0,0 +1,14 @@ +.POSIX: + +CFLAGS=-D _POSIX_C_SOURCE=200809L -D _XOPEN_SOURCE=700 + +localedef: localedef.c + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< + +clean: + -rm localedef + +install: localedef + cp localedef $(DESTDIR)/usr/bin/localedef + cp localedef.1 $(DESTDIR)/usr/share/man/man1/localedef.1 + diff --git a/localedef/localedef.1 b/localedef/localedef.1 new file mode 100644 index 0000000..8284299 --- /dev/null +++ b/localedef/localedef.1 @@ -0,0 +1,39 @@ +.Dd April 9, 2016 +.Dt LOCALEDEF 1 "Base Commands Manual" +.Os "Adélie Linux" + +.Sh NAME +.Nm localedef +.Nd define a new locale + +.Sh SYNOPSIS +.Nm +.Op Fl c +.Op Fl f Ar charmap +.Op Fl i Ar sourcefile +.Op Fl u Ar code_set_name +.Ar name + +.Sh DESCRIPTION +This utility returns 3, which is defined in +.St -p1003.1 2013 Edition +as marking that the implementation does not support creation of new locales. + +It is intended only for use on musl libc systems, where POSIX2_LOCALEDEF is +undefined. + +.Sh DIAGNOSTICS +3: The implementation does not support the creation of new locales. + +.Sh SEE ALSO + +.Xr locale 1 . + +.Sh STANDARDS +Conforming to +.St -p1003.1 2013 Edition. + +.Sh AUTHORS +.An A. Wilcox +.Aq awilfox@adelielinux.org + diff --git a/localedef/localedef.c b/localedef/localedef.c new file mode 100644 index 0000000..0d1dfff --- /dev/null +++ b/localedef/localedef.c @@ -0,0 +1,4 @@ +int main(void) +{ + return 3; +} -- cgit v1.2.3-60-g2f50