What does -D_XOPEN_SOURCE do/mean?

后端 未结 4 486
自闭症患者
自闭症患者 2020-11-29 19:33

I recently encountered some code that gcc would not compile without this arg. I checked the gcc man page, but did not find this specific option. I did find XOPEN_SOURC

4条回答
  •  时光说笑
    2020-11-29 20:01

    For some unknown reason, Mac OS/X (XCode) requires 600 to define strdup(), even though it's in the 1995 specification. Mozilla and others have run into this...

提交回复
热议问题