Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/lib/util/charset/tests/charset.c

    r414 r745  
    247247struct torture_suite *torture_local_charset(TALLOC_CTX *mem_ctx)
    248248{
    249         struct torture_suite *suite = torture_suite_create(mem_ctx, "CHARSET");
     249        struct torture_suite *suite = torture_suite_create(mem_ctx, "charset");
    250250
    251251        torture_suite_add_simple_test(suite, "toupper_m", test_toupper_m);
  • trunk/server/lib/util/charset/tests/iconv.c

    r414 r745  
    3636        iconv_t cd;
    3737
    38         if (!lp_parm_bool(tctx->lp_ctx, NULL, "iconv", "native", true))
     38        if (!lpcfg_parm_bool(tctx->lp_ctx, NULL, "iconv", "native", true))
    3939                torture_skip(tctx, "system iconv disabled - skipping test");
    4040
     
    135135        uint8_t buf1[1000], buf2[1000], buf3[1000];
    136136        size_t outsize1, outsize2, outsize3;
    137         const char *ptr_in;
     137        char *ptr_in;
    138138        char *ptr_out;
    139139        size_t size_in1, size_in2, size_in3;
     
    159159                                                     charset));
    160160                }
    161                 cd2 = smb_iconv_open_ex(test, charset, "UTF-16LE", lp_parm_bool(test->lp_ctx, NULL, "iconv", "native", true));
    162                 cd3 = smb_iconv_open_ex(test, "UTF-16LE", charset, lp_parm_bool(test->lp_ctx, NULL, "iconv", "native", true));
     161                cd2 = smb_iconv_open_ex(test, charset, "UTF-16LE", lpcfg_parm_bool(test->lp_ctx, NULL, "iconv", "native", true));
     162                cd3 = smb_iconv_open_ex(test, "UTF-16LE", charset, lpcfg_parm_bool(test->lp_ctx, NULL, "iconv", "native", true));
    163163                last_charset = charset;
    164164        }
    165165
    166166        /* internal convert to charset - placing result in buf1 */
    167         ptr_in = (const char *)inbuf;
     167        ptr_in = (char *)inbuf;
    168168        ptr_out = (char *)buf1;
    169169        size_in1 = size;
     
    172172        memset(ptr_out, 0, outsize1);
    173173        errno = 0;
    174         ret1 = smb_iconv(cd2, &ptr_in, &size_in1, &ptr_out, &outsize1);
     174        ret1 = smb_iconv(cd2, (const char **) &ptr_in, &size_in1, &ptr_out, &outsize1);
    175175        errno1 = errno;
    176176
    177177        /* system convert to charset - placing result in buf2 */
    178         ptr_in = (const char *)inbuf;
     178        ptr_in = (char *)inbuf;
    179179        ptr_out = (char *)buf2;
    180180        size_in2 = size;
     
    183183        memset(ptr_out, 0, outsize2);
    184184        errno = 0;
    185         ret2 = iconv(cd, discard_const_p(char *, &ptr_in), &size_in2, &ptr_out, &outsize2);
     185        ret2 = iconv(cd, &ptr_in, &size_in2, &ptr_out, &outsize2);
    186186        errno2 = errno;
    187187
     
    237237        /* convert back to UTF-16, putting result in buf3 */
    238238        size = size - size_in1;
    239         ptr_in = (const char *)buf1;
     239        ptr_in = (char *)buf1;
    240240        ptr_out = (char *)buf3;
    241241        size_in3 = len1;
     
    243243
    244244        memset(ptr_out, 0, outsize3);
    245         ret3 = smb_iconv(cd3, &ptr_in, &size_in3, &ptr_out, &outsize3);
     245        ret3 = smb_iconv(cd3, (const char **) &ptr_in, &size_in3, &ptr_out, &outsize3);
    246246
    247247        /* we only internally support the first 1M codepoints */
     
    290290        codepoint_t c;
    291291
    292         size = push_codepoint_convenience(lp_iconv_convenience(tctx->lp_ctx), (char *)buf, codepoint);
     292        size = push_codepoint_convenience(lpcfg_iconv_convenience(tctx->lp_ctx), (char *)buf, codepoint);
    293293        torture_assert(tctx, size != -1 || (codepoint >= 0xd800 && codepoint <= 0x10000),
    294294                       "Invalid Codepoint range");
     
    301301        buf[size+3] = random();
    302302
    303         c = next_codepoint_convenience(lp_iconv_convenience(tctx->lp_ctx), (char *)buf, &size2);
     303        c = next_codepoint_convenience(lpcfg_iconv_convenience(tctx->lp_ctx), (char *)buf, &size2);
    304304
    305305        torture_assert(tctx, c == codepoint,
     
    452452struct torture_suite *torture_local_iconv(TALLOC_CTX *mem_ctx)
    453453{
    454         struct torture_suite *suite = torture_suite_create(mem_ctx, "ICONV");
     454        struct torture_suite *suite = torture_suite_create(mem_ctx, "iconv");
    455455
    456456        torture_suite_add_simple_test(suite, "string2key",
Note: See TracChangeset for help on using the changeset viewer.