mirror of
https://github.com/samba-team/samba.git
synced 2025-03-05 20:58:40 +03:00
Fix for printf attribute from Mattias Gronlund <Mattias.Gronlund@sa.erisoft.se>
Added "codepage directory" patch from Peter.Polkinghorne@brunel.ac.uk Jeremy.
This commit is contained in:
parent
4862d2ab11
commit
e49566c2e2
@ -40,12 +40,12 @@
|
||||
#ifdef HAVE_STDARG_H
|
||||
int Debug1( char *, ... )
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((format (printf, 1, 2)))
|
||||
__attribute__ ((format (__printf__, 1, 2)))
|
||||
#endif
|
||||
;
|
||||
BOOL dbgtext( char *, ... )
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((format (printf, 1, 2)))
|
||||
__attribute__ ((format (__printf__, 1, 2)))
|
||||
#endif
|
||||
;
|
||||
#else
|
||||
|
@ -1370,6 +1370,7 @@ char *lp_winbind_gid(void);
|
||||
char *lp_template_homedir(void);
|
||||
char *lp_template_shell(void);
|
||||
char *lp_winbind_separator(void);
|
||||
char *lp_codepagedir(void);
|
||||
char *lp_ldap_server(void);
|
||||
char *lp_ldap_suffix(void);
|
||||
char *lp_ldap_filter(void);
|
||||
|
@ -1286,7 +1286,7 @@ struct bitmap {
|
||||
#ifdef HAVE_STDARG_H
|
||||
int slprintf(char *str, int n, char *format, ...)
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((format (printf, 3, 4)))
|
||||
__attribute__ ((format (__printf__, 3, 4)))
|
||||
#endif
|
||||
;
|
||||
#else
|
||||
@ -1296,7 +1296,7 @@ int slprintf();
|
||||
#ifdef HAVE_STDARG_H
|
||||
int fdprintf(int fd, char *format, ...)
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((format (printf, 2, 3)))
|
||||
__attribute__ ((format (__printf__, 2, 3)))
|
||||
#endif
|
||||
;
|
||||
#else
|
||||
|
@ -195,13 +195,13 @@ static codepage_p load_client_codepage( int client_codepage )
|
||||
|
||||
DEBUG(5, ("load_client_codepage: loading codepage %d.\n", client_codepage));
|
||||
|
||||
if(strlen(CODEPAGEDIR) + 14 > sizeof(codepage_file_name))
|
||||
if(strlen(lp_codepagedir()) + 14 > sizeof(codepage_file_name))
|
||||
{
|
||||
DEBUG(0,("load_client_codepage: filename too long to load\n"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pstrcpy(codepage_file_name, CODEPAGEDIR);
|
||||
pstrcpy(codepage_file_name, lp_codepagedir());
|
||||
pstrcat(codepage_file_name, "/");
|
||||
pstrcat(codepage_file_name, "codepage.");
|
||||
slprintf(&codepage_file_name[strlen(codepage_file_name)],
|
||||
@ -348,13 +348,13 @@ void codepage_initialise(int client_codepage)
|
||||
#ifdef KANJI
|
||||
DEBUG(6,("codepage_initialise: loading dynamic codepage file %s/codepage.%d \
|
||||
for code page %d failed. Using default client codepage 932\n",
|
||||
CODEPAGEDIR, client_codepage, client_codepage));
|
||||
lp_codepagedir(), client_codepage, client_codepage));
|
||||
cp = cp_932;
|
||||
client_codepage = KANJI_CODEPAGE;
|
||||
#else /* KANJI */
|
||||
DEBUG(6,("codepage_initialise: loading dynamic codepage file %s/codepage.%d \
|
||||
for code page %d failed. Using default client codepage 850\n",
|
||||
CODEPAGEDIR, client_codepage, client_codepage));
|
||||
lp_codepagedir(), client_codepage, client_codepage));
|
||||
cp = cp_850;
|
||||
client_codepage = MSDOS_LATIN_1_CODEPAGE;
|
||||
#endif /* KANJI */
|
||||
|
@ -135,6 +135,7 @@ typedef struct
|
||||
char *szGroupnameMap;
|
||||
#endif /* USING_GROUPNAME_MAP */
|
||||
char *szCharacterSet;
|
||||
char *szCodePageDir;
|
||||
char *szLogonScript;
|
||||
char *szLogonPath;
|
||||
char *szLogonDrive;
|
||||
@ -627,6 +628,7 @@ static struct parm_struct parm_table[] = {
|
||||
|
||||
{"coding system", P_STRING, P_GLOBAL, &Globals.szCodingSystem, handle_coding_system, NULL, 0},
|
||||
{"client code page", P_INTEGER, P_GLOBAL, &Globals.client_code_page, handle_client_code_page, NULL, 0},
|
||||
{"code page directory", P_STRING, P_GLOBAL, &Globals.szCodePageDir, NULL, NULL, 0},
|
||||
{"comment", P_STRING, P_LOCAL, &sDefault.comment, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT | FLAG_DOS_STRING},
|
||||
{"path", P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT | FLAG_DOS_STRING},
|
||||
{"directory", P_STRING, P_LOCAL, &sDefault.szPath, NULL, NULL, FLAG_DOS_STRING},
|
||||
@ -1136,6 +1138,7 @@ static void init_globals(void)
|
||||
string_set(&Globals.szLogonPath, "\\\\%N\\%U\\profile");
|
||||
|
||||
string_set(&Globals.szNameResolveOrder, "lmhosts host wins bcast");
|
||||
string_set(&Globals.szCodePageDir, CODEPAGEDIR);
|
||||
|
||||
Globals.bLoadPrinters = True;
|
||||
Globals.bUseRhosts = False;
|
||||
@ -1384,6 +1387,7 @@ FN_GLOBAL_STRING(lp_winbind_gid, &Globals.szWinbindGID)
|
||||
FN_GLOBAL_STRING(lp_template_homedir, &Globals.szTemplateHomedir)
|
||||
FN_GLOBAL_STRING(lp_template_shell, &Globals.szTemplateShell)
|
||||
FN_GLOBAL_STRING(lp_winbind_separator, &Globals.szWinbindSeparator)
|
||||
FN_GLOBAL_STRING(lp_codepagedir,&Globals.szCodePageDir)
|
||||
#ifdef WITH_LDAP
|
||||
FN_GLOBAL_STRING(lp_ldap_server, &Globals.szLdapServer);
|
||||
FN_GLOBAL_STRING(lp_ldap_suffix, &Globals.szLdapSuffix);
|
||||
|
Loading…
x
Reference in New Issue
Block a user