Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/scripts/basic/fixdep.c

    r1765 r2725  
    204204void use_config(char *m, int slen)
    205205{
    206     char s[PATH_MAX];
     206    char *s = alloca(slen+1);
    207207    char *p;
    208208
     
    226226{
    227227    /* modified for bbox */
    228     char *end_4 = map + len - 4; /* 4 == length of "USE_" */
     228    char *end_3 = map + len - 3; /* 3 == length of "IF_" */
    229229    char *end_7 = map + len - 7;
    230230    char *p = map;
     
    232232    int off;
    233233
    234     for (; p < end_4; p++) {
     234    for (; p <= end_3; p++) {
     235        /* Find next identifier's beginning */
     236        if (!(isalnum(*p) || *p == '_'))
     237            continue;
     238
     239        /* Check it */
    235240        if (p < end_7 && p[6] == '_') {
    236241            if (!memcmp(p, "CONFIG", 6)) goto conf7;
    237242            if (!memcmp(p, "ENABLE", 6)) goto conf7;
    238         }
    239         /* We have at least 5 chars: for() has
    240          * "p < end-4", not "p <= end-4"
    241          * therefore we don't need to check p <= end-5 here */
    242         if (p[4] == '_')
    243             if (!memcmp(p, "SKIP", 4)) goto conf5;
    244         /* Ehhh, gcc is too stupid to just compare it as 32bit int */
    245         if (p[0] == 'U')
    246             if (!memcmp(p, "USE_", 4)) goto conf4;
     243            if (!memcmp(p, "IF_NOT", 6)) goto conf7;
     244        }
     245        /* we have at least 3 chars because of p <= end_3 */
     246        /*if (!memcmp(p, "IF_", 3)) ...*/
     247        if (p[0] == 'I' && p[1] == 'F' && p[2] == '_') {
     248            off = 3;
     249            goto conf;
     250        }
     251
     252        /* This identifier is not interesting, skip it */
     253        while (p <= end_3 && (isalnum(*p) || *p == '_'))
     254            p++;
    247255        continue;
    248256
    249     conf4:  off = 4;
    250     conf5:  off = 5;
    251257    conf7:  off = 7;
     258    conf:
    252259        p += off;
    253         for (q = p; q < end_4+4; q++) {
     260        for (q = p; q < end_3+3; q++) {
    254261            if (!(isalnum(*q) || *q == '_'))
    255262                break;
    256263        }
    257         use_config(p, q-p);
     264        if (q != p) {
     265            use_config(p, q-p);
     266        }
    258267    }
    259268}
     
    307316    char *end = m + len;
    308317    char *p;
    309     char s[PATH_MAX];
     318    char *s = alloca(len);
    310319
    311320    p = memchr(m, ':', len);
Note: See TracChangeset for help on using the changeset viewer.