GLOB_BRACE 可移植性?
在这个问题中,我意识到了 glob()的 GLOB_BRACE
选项允许在搜索文件时使用一组有限的正则表达式。
这看起来就像我需要的,但根据 手册, GLOB_BRACE
“在某些非 GNU 操作系统上不可用”。 Solaris 似乎就是其中之一。
我正在构建一个应该尽可能便携的应用程序,因此我需要尽早检查可能出现的问题。
有人知道除了 Solaris 之外还有其他不支持 GLOB_BRACE 的平台吗?例如,Mac OS >= X 怎么样?它构建在 Unix 之上。每个 Unix 都会自动成为手册中定义的“GNU”平台吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查相关的
glob( 3) *nix 变体的
手册页 将告诉您它是否支持GLOB_BRACE
。Checking the relevant
glob(3)
man page for the *nix variant will tell you whether or not it supportsGLOB_BRACE
.