* lib/defines.h: Include <config.h> since it uses the macro that
might be defined in this header file. * lib/defines.h: Prefer checking if HAVE_LOCALE_H or ENABLE_NLS are defined (rather than set to non 0). * lib/defines.h: The dummy implementations of bindtextdomain() and textdomain() should return a pointer. Return NULL instead of /* empty */ * lib/defines.h: Define SHADOW_SP_FLAG_UNSET, to be used for the initialization of sp_flag field of the shadow structures. * lib/defines.h: Define LC_ALL, needed even if HAVE_LOCALE_H is not defined.
This commit is contained in:
parent
07a6bcaa77
commit
c82cfebd5e
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
|||||||
|
2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* lib/defines.h: Include <config.h> since it uses the macro that
|
||||||
|
might be defined in this header file.
|
||||||
|
* lib/defines.h: Prefer checking if HAVE_LOCALE_H or ENABLE_NLS
|
||||||
|
are defined (rather than set to non 0).
|
||||||
|
* lib/defines.h: The dummy implementations of bindtextdomain() and
|
||||||
|
textdomain() should return a pointer. Return NULL instead of
|
||||||
|
/* empty */
|
||||||
|
* lib/defines.h: Define SHADOW_SP_FLAG_UNSET, to be used for the
|
||||||
|
initialization of sp_flag field of the shadow structures.
|
||||||
|
* lib/defines.h: Define LC_ALL, needed even if HAVE_LOCALE_H is
|
||||||
|
not defined.
|
||||||
|
|
||||||
2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
|
2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* libmisc/sulog.c: Ignore the return value of umask() when the
|
* libmisc/sulog.c: Ignore the return value of umask() when the
|
||||||
|
@ -4,25 +4,33 @@
|
|||||||
#ifndef _DEFINES_H_
|
#ifndef _DEFINES_H_
|
||||||
#define _DEFINES_H_
|
#define _DEFINES_H_
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
|
#define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
|
||||||
|
|
||||||
/* Take care of NLS matters. */
|
/* Take care of NLS matters. */
|
||||||
|
|
||||||
#if HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
# include <locale.h>
|
# include <locale.h>
|
||||||
|
#else
|
||||||
|
# undef setlocale
|
||||||
|
# define setlocale(category, locale) (NULL)
|
||||||
|
# ifndef LC_ALL
|
||||||
|
# define LC_ALL 6
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define gettext_noop(String) (String)
|
#define gettext_noop(String) (String)
|
||||||
/* #define gettext_def(String) "#define String" */
|
/* #define gettext_def(String) "#define String" */
|
||||||
|
|
||||||
#if ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
# define _(Text) gettext (Text)
|
# define _(Text) gettext (Text)
|
||||||
#else
|
#else
|
||||||
# undef bindtextdomain
|
# undef bindtextdomain
|
||||||
# define bindtextdomain(Domain, Directory) /* empty */
|
# define bindtextdomain(Domain, Directory) (NULL)
|
||||||
# undef textdomain
|
# undef textdomain
|
||||||
# define textdomain(Domain) /* empty */
|
# define textdomain(Domain) (NULL)
|
||||||
# define _(Text) Text
|
# define _(Text) Text
|
||||||
# define ngettext(Msgid1, Msgid2, N) \
|
# define ngettext(Msgid1, Msgid2, N) \
|
||||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||||
@ -136,7 +144,7 @@ char *strchr (), *strrchr (), *strtok ();
|
|||||||
|
|
||||||
/* cleaner than lots of #ifdefs everywhere - use this as follows:
|
/* cleaner than lots of #ifdefs everywhere - use this as follows:
|
||||||
SYSLOG((LOG_CRIT, "user %s cracked root", user)); */
|
SYSLOG((LOG_CRIT, "user %s cracked root", user)); */
|
||||||
#if ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
/* Temporarily set LC_TIME to "C" to avoid strange dates in syslog.
|
/* Temporarily set LC_TIME to "C" to avoid strange dates in syslog.
|
||||||
This is a workaround for a more general syslog(d) design problem -
|
This is a workaround for a more general syslog(d) design problem -
|
||||||
syslogd should log the current system time for each event, and not
|
syslogd should log the current system time for each event, and not
|
||||||
@ -303,6 +311,8 @@ extern char *strerror ();
|
|||||||
#define SHADOW_PASSWD_STRING "x"
|
#define SHADOW_PASSWD_STRING "x"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SHADOW_SP_FLAG_UNSET ((unsigned long int)-1)
|
||||||
|
|
||||||
#ifdef WITH_AUDIT
|
#ifdef WITH_AUDIT
|
||||||
#ifdef __u8 /* in case we use pam < 0.80 */
|
#ifdef __u8 /* in case we use pam < 0.80 */
|
||||||
#undef __u8
|
#undef __u8
|
||||||
@ -332,8 +342,8 @@ typedef unsigned char _Bool;
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# define bool _Bool
|
# define bool _Bool
|
||||||
# define false 0
|
# define false (0)
|
||||||
# define true 1
|
# define true (1)
|
||||||
# define __bool_true_false_are_defined 1
|
# define __bool_true_false_are_defined 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user