Ignore:
Timestamp:
Feb 4, 2007, 1:09:12 PM (18 years ago)
Author:
bird
Message:

HAVE_SYS_CDEFS_H

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ash/bltin/test.c

    r809 r843  
    1111 */
    1212
    13 #ifndef __sun__
     13#ifdef HAVE_SYS_CDEFS_H
    1414#include <sys/cdefs.h>
    1515#endif
     
    196196#ifdef HAVE_SETPROGNAME
    197197        setprogname(argv[0]);
    198 #endif 
     198#endif
    199199        if (strcmp(argv[0], "[") == 0) {
    200200                if (strcmp(argv[--argc], "]"))
     
    292292        if (t_lex(t_wp[1]), t_wp_op && t_wp_op->op_type == BINOP) {
    293293                return binop();
    294         }         
     294        }
    295295
    296296        return strlen(*t_wp) > 0;
     
    309309        if ((opnd2 = *++t_wp) == NULL)
    310310                syntax(op->op_text, "argument expected");
    311                
     311
    312312        switch (op->op_num) {
    313313        case STREQ:
     
    369369#else
    370370        return 0;
    371 #endif 
     371#endif
    372372        case FILBDEV:
    373373#ifdef S_ISBLK
     
    375375#else
    376376        return 0;
    377 #endif 
     377#endif
    378378        case FILFIFO:
    379379#ifdef S_ISFIFO
     
    381381#else
    382382        return 0;
    383 #endif 
     383#endif
    384384        case FILSOCK:
    385385#ifdef S_ISSOCK
     
    387387#else
    388388        return 0;
    389 #endif 
     389#endif
    390390        case FILSYM:
    391391                return S_ISLNK(s.st_mode);
     
    399399#else
    400400        return 0;
    401 #endif 
     401#endif
    402402        case FILGZ:
    403403                return s.st_size > (off_t)0;
     
    450450                if (strcmp(s, op->op_text) == 0)
    451451                        return op->op_type == BINOP &&
    452                             (t[0] != ')' || t[1] != '\0'); 
     452                            (t[0] != ')' || t[1] != '\0');
    453453                op++;
    454454        }
     
    471471        while (isspace((unsigned char)*p))
    472472              p++;
    473        
     473
    474474        if (*p)
    475475              error("%s: bad number", s);
Note: See TracChangeset for help on using the changeset viewer.