开发者

GLOB_BRACE portability?

开发者 https://www.devze.com 2022-12-24 06:18 出处:网络
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.开发者_如何学运维

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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号