]> git.sur5r.net Git - openldap/blob - include/ac/localize.h
Fix select/yield
[openldap] / include / ac / localize.h
1 /* localize.h (i18n/l10n) */
2 /* $OpenLDAP$ */
3 /*
4  * Copyright 2003 The OpenLDAP Foundation, Redwood City, California, USA
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted only as authorized by the OpenLDAP
9  * Public License.  A copy of this license is available at
10  * http://www.OpenLDAP.org/license.html or in file LICENSE in the
11  * top-level directory of the distribution.
12  */
13
14 #ifndef _AC_LOCALIZE_H
15 #define _AC_LOCALIZE_H
16
17 #ifdef LDAP_LOCALIZE
18
19 #       include <locale.h>
20 #       include <libintl.h>
21
22         /* enable i18n/l10n */
23 #       define gettext_noop(s)          s
24 #       define _(s)                                     gettext(s)
25 #       define N_(s)                            gettext_noop(s)
26 #       define ldap_pvt_setlocale(c,l)          ((void) setlocale(c, l))
27 #       define ldap_pvt_textdomain(d)           ((void) textdomain(d))
28 #       define ldap_pvt_bindtextdomain(p,d)     ((void) bindtextdomain(p, d))
29
30 #else
31
32         /* disable i18n/l10n */
33 #       define _(s)                                     s
34 #       define N_(s)                            s
35 #       define ldap_pvt_setlocale(c,l)          ((void) 0)
36 #       define ldap_pvt_textdomain(d)           ((void) 0)
37 #       define ldap_pvt_bindtextdomain(p,d)     ((void) 0)
38
39 #endif
40
41 #endif /* _AC_LOCALIZE_H */