Fix the build. Looks like no one ever compiled this on a system with a libintl.h...
authorJeremy Allison <jra@samba.org>
Tue, 24 Feb 2009 20:19:06 +0000 (12:19 -0800)
committerStefan Metzmacher <metze@samba.org>
Thu, 26 Mar 2009 08:54:51 +0000 (09:54 +0100)
kuser/kinit.c
lib/krb5/context.c

index 8c646ea5526913c2f3fa385b6e096b312c7b5210..bf52a38391b665bccd7d6ce200f057fd019c1e47 100644 (file)
@@ -768,8 +768,10 @@ main (int argc, char **argv)
     setprogname (argv[0]);
 
     setlocale (LC_ALL, "");
+#if defined(HEIMDAL_LOCALEDIR)
     bindtextdomain ("heimdal_kuser", HEIMDAL_LOCALEDIR);
     textdomain("heimdal_kuser");
+#endif
 
     ret = krb5_init_context (&context);
     if (ret == KRB5_CONFIG_BADFORMAT)
index 5fa8b6204a563d2446cb7aeba7c73559889719ef..26c1697ea01412e695f4a4269eb55a431dc85ee5 100644 (file)
@@ -293,7 +293,9 @@ krb5_init_context(krb5_context *context)
     *context = NULL;
 
     /* should have a run_once */
+#if defined(HEIMDAL_LOCALEDIR)
     bindtextdomain(HEIMDAL_TEXTDOMAIN, HEIMDAL_LOCALEDIR);
+#endif
 
     p = calloc(1, sizeof(*p));
     if(!p)
@@ -837,20 +839,30 @@ krb5_init_ets(krb5_context context)
 {
     if(context->et_list == NULL){
        krb5_add_et_list(context, initialize_krb5_error_table_r);
+#if defined(HEIMDAL_LOCALEDIR)
        bindtextdomain(COM_ERR_BINDDOMAIN_krb5, HEIMDAL_LOCALEDIR);
+#endif
 
        krb5_add_et_list(context, initialize_asn1_error_table_r);
+#if defined(HEIMDAL_LOCALEDIR)
        bindtextdomain(COM_ERR_BINDDOMAIN_asn1, HEIMDAL_LOCALEDIR);
+#endif
 
        krb5_add_et_list(context, initialize_heim_error_table_r);
+#if defined(HEIMDAL_LOCALEDIR)
        bindtextdomain(COM_ERR_BINDDOMAIN_heim, HEIMDAL_LOCALEDIR);
+#endif
 
        krb5_add_et_list(context, initialize_k524_error_table_r);
+#if defined(HEIMDAL_LOCALEDIR)
        bindtextdomain(COM_ERR_BINDDOMAIN_k524, HEIMDAL_LOCALEDIR);
+#endif
 
 #ifdef PKINIT
        krb5_add_et_list(context, initialize_hx_error_table_r);
+#if defined(HEIMDAL_LOCALEDIR)
        bindtextdomain(COM_ERR_BINDDOMAIN_hx, HEIMDAL_LOCALEDIR);
+#endif
 #endif
     }
 }