Ignore:
Timestamp:
Jun 4, 2010, 3:11:43 PM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: merged changes from 3.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/param/loadparm.c

    r414 r454  
    46654665                case PRINT_AIX:
    46664666                case PRINT_LPRNT:
     4667#ifndef __OS2__
    46674668                case PRINT_LPROS2:
     4669#endif
    46684670                        string_set(&pService->szLpqcommand, "lpq -P'%p'");
    46694671                        string_set(&pService->szLprmcommand, "lprm -P'%p' %j");
    46704672                        string_set(&pService->szPrintcommand, "lpr -r -P'%p' %s");
    46714673                        break;
     4674#ifdef __OS2__
     4675                case PRINT_LPROS2:
     4676                        string_set(&pService->szLpqcommand, "lpq.exe -s %i -p %p");
     4677                        string_set(&pService->szLprmcommand, "lprm.exe -s %i -p %p %j");
     4678                        string_set(&pService->szPrintcommand, "lpr.exe -b -s %i -p %p %s & cmd.exe /c del %s");
     4679                        break;
     4680#endif         
    46724681
    46734682                case PRINT_LPRNG:
     
    49384947        string_set(&Globals.szGuestaccount, GUEST_ACCOUNT);
    49394948
     4949#ifdef __OS2__
     4950        /* search the system codepage and set OS2CodePageStr */
     4951        unsigned long _System DosQueryCp (unsigned long ulLength, unsigned long *pCodePageList, unsigned long *pDataLength);
     4952        char *OS2CodePageStr=NULL;
     4953        unsigned long OS2CodePage[3];
     4954        unsigned long OS2CodePageLen;
     4955        if ( DosQueryCp( sizeof(OS2CodePage), OS2CodePage, &OS2CodePageLen ) )
     4956           asprintf(&OS2CodePageStr, "SYSTEM");
     4957          else
     4958           asprintf(&OS2CodePageStr, "IBM-%u", OS2CodePage[0]);
     4959#endif
     4960#ifndef __OS2__
    49404961        /* using UTF8 by default allows us to support all chars */
    49414962        string_set(&Globals.unix_charset, DEFAULT_UNIX_CHARSET);
     4963#else
     4964        /* On OS/2, using UTF8 causes problems with display of foreign
     4965           characters - default to system codepage */
     4966        string_set(&Globals.unix_charset, OS2CodePageStr);
     4967#endif
    49424968
    49434969#if defined(HAVE_NL_LANGINFO) && defined(CODESET)
    49444970        /* If the system supports nl_langinfo(), try to grab the value
    49454971           from the user's locale */
     4972#ifndef __OS2__
    49464973        string_set(&Globals.display_charset, "LOCALE");
     4974#else
     4975        /* On OS/2, using UTF8 causes problems with display of foreign
     4976           characters - default to system codepage */
     4977        string_set(&Globals.display_charset, OS2CodePageStr);
     4978#endif 
     4979
    49474980#else
    49484981        string_set(&Globals.display_charset, DEFAULT_DISPLAY_CHARSET);
    49494982#endif
    49504983
     4984#ifndef __OS2__
    49514985        /* Use codepage 850 as a default for the dos character set */
    49524986        string_set(&Globals.dos_charset, DEFAULT_DOS_CHARSET);
     4987#else
     4988        /* On OS/2, using UTF8 causes problems with display of foreign
     4989           characters - default to system codepage */
     4990        string_set(&Globals.dos_charset, OS2CodePageStr);
     4991#endif
    49534992
    49544993        /*
Note: See TracChangeset for help on using the changeset viewer.