Description of Problem: The enum statement in /usr/include/dirent.h is wrongly defined in that the enum statement has #define statements embedded in it. The gcc and cc compilers won't accept this in my C source-code. I moved the #define statements in front of the enum (See below) and everything works fine. This is used when reading the filenames held in a directory from a C program. Old dirent.h code .... #ifdef __USE_BSD /* File types for `d_type'. */ enum { DT_UNKNOWN = 0, # define DT_UNKNOWN DT_UNKNOWN DT_FIFO = 1, # define DT_FIFO DT_FIFO DT_CHR = 2, # define DT_CHR DT_CHR DT_DIR = 4, # define DT_DIR DT_DIR DT_BLK = 6, # define DT_BLK DT_BLK DT_REG = 8, # define DT_REG DT_REG DT_LNK = 10, # define DT_LNK DT_LNK DT_SOCK = 12, # define DT_SOCK DT_SOCK DT_WHT = 14 # define DT_WHT DT_WHT }; New dirent.h code...... #ifdef __USE_BSD /* File types for `d_type'. */ # define DT_UNKNOWN DT_UNKNOWN # define DT_FIFO DT_FIFO # define DT_CHR DT_CHR # define DT_DIR DT_DIR # define DT_BLK DT_BLK # define DT_REG DT_REG # define DT_LNK DT_LNK # define DT_SOCK DT_SOCK # define DT_WHT DT_WHT enum { DT_UNKNOWN = 0, DT_FIFO = 1, DT_CHR = 2, DT_DIR = 4, DT_BLK = 6, DT_REG = 8, DT_LNK = 10, DT_SOCK = 12, DT_WHT = 14 }; This WORKS!!!! Regards, Howard. Version-Release number of selected component (if applicable): Red Hat 7.1 How Reproducible: Compile a C program that includes the file /usr/include/dirent.h using gcc or cc Steps to Reproduce: 1. 2. 3. Actual Results: Compilations Fails. Expected Results: Additional Information:
Err, can you clarify what's wrong on it (I don't see anything) and how a compiler doesn't accept it (and on which testcase)?