GLOB_BRACE portability?

房东的猫 提交于 2019-12-24 15:12:09

问题


In this question, I was made aware of glob()'s GLOB_BRACE option that allows for a limited set of regular expressions when searching for files.

This looks just like what I need, but according to the manual, GLOB_BRACE is "not available on some Non-GNU Operating systems." Among those seems to be Solaris.

I am building an application that is supposed to be as portable as possible, so I need to check out possible problems as early as possible.

Does somebody know of other platforms apart from Solaris where GLOB_BRACE is not supported? How about Mac OS >= X for example? It's built on top of a Unix. Is every Unix automatically a "GNU" platform as defined in the manual?


回答1:


Checking the relevant glob(3) man page for the *nix variant will tell you whether or not it supports GLOB_BRACE.



来源:https://stackoverflow.com/questions/2536924/glob-brace-portability

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!