What is the purpose of a these #define within an enum?

前端 未结 5 1116
借酒劲吻你
借酒劲吻你 2020-12-01 11:56

I found this code in the linux headers, /usr/include/dirent.h:

enum   
  {    
    DT_UNKNOWN = 0,
# define DT_UNKNOWN DT_UNKNOWN
    DT_FIFO = 1,
# define D         


        
5条回答
  •  渐次进展
    2020-12-01 12:32

    My guess is that some other code can then check if one of (or more of) these enum values have been defined using #ifdef.

提交回复
热议问题