mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-23 00:30:02 +01:00
Use proper NLS macros and detection (so the message translation works again).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@145 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
* Check in configure if selinux libraries are required in static version.
|
||||
* Add temporary debug code to find processes locking internal device.
|
||||
* Simplify build system, use autopoint and clean gettext processing.
|
||||
* Use proper NLS macros and detection (so the message translation works again).
|
||||
|
||||
2009-09-30 Milan Broz <mbroz@redhat.com>
|
||||
* Fix exported symbols and versions in libcryptsetup.
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <libintl.h>
|
||||
#include <locale.h>
|
||||
#define _(String) gettext((String))
|
||||
#include "nls.h"
|
||||
|
||||
#define SECTOR_SHIFT 9
|
||||
#define SECTOR_SIZE (1 << SECTOR_SHIFT)
|
||||
|
||||
32
lib/nls.h
Normal file
32
lib/nls.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef CRYPTSETUP_NLS_H
|
||||
#define CRYPTSETUP_NLS_H
|
||||
|
||||
#ifndef LOCALEDIR
|
||||
#define LOCALEDIR "/usr/share/locale"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#else
|
||||
# undef setlocale
|
||||
# define setlocale(Category, Locale) /* empty */
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
# ifdef gettext_noop
|
||||
# define N_(String) gettext_noop (String)
|
||||
# else
|
||||
# define N_(String) (String)
|
||||
# endif
|
||||
#else
|
||||
# undef bindtextdomain
|
||||
# define bindtextdomain(Domain, Directory) /* empty */
|
||||
# undef textdomain
|
||||
# define textdomain(Domain) /* empty */
|
||||
# define _(Text) (Text)
|
||||
# define N_(Text) (Text)
|
||||
#endif
|
||||
|
||||
#endif /* CRYPTSETUP_H */
|
||||
@@ -5,26 +5,7 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
#if !HAVE_SETLOCALE
|
||||
# define setlocale(Category, Locale) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
#else
|
||||
# undef bindtextdomain
|
||||
# define bindtextdomain(Domain, Directory) do { } while (0)
|
||||
# undef textdomain
|
||||
# define textdomain(Domain) do { } while (0)
|
||||
# undef dcgettext
|
||||
# define dcgettext(Domainname, Text, Category) Text
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
#define N_(Text) (Text)
|
||||
#include "lib/nls.h"
|
||||
|
||||
#define DEFAULT_CIPHER "aes"
|
||||
#define DEFAULT_LUKS_CIPHER "aes-cbc-essiv:sha256"
|
||||
|
||||
Reference in New Issue
Block a user