ANSI C是否具有PATHMAX或MAX_PATH之类的东西? [英] Does ANSI C have something like PATHMAX or MAX_PATH?
问题描述
嗨!
我查看了常见问题解答,但一无所获。 :-)
看来这种宏依赖于平台,不是吗?
谢谢。>
Sunner Sun
Hi!
I have looked through the FAQ but found nothing about it. :-)
It seems that this kind of macro is platform dependent, doesn''t it?
Thank you.
Sunner Sun
推荐答案
Sunner Sun写道:
Sunner Sun wrote:
嗨!
我查看了常见问题,但没有发现任何相关信息。 :-)
似乎这种宏依赖于平台,不是吗?
Hi!
I have looked through the FAQ but found nothing about it. :-)
It seems that this kind of macro is platform dependent, doesn''t it?
标准宏FILENAME_MAX应该是大到足以指定一个
字符串,它将保存最长的名称,可用于打开
文件。宏是标准的,它的_value_将根据
平台改变,就像UINT_MAX或DBL_EPSILON一样。这就是为什么它们是
宏而不是指定的文字值。
The standard macro FILENAME_MAX should be large enough to specify a
string which will hold the longest name which can be used to open a
file. The macro is standard, it''s _value_ will change according to
platform, just as UINT_MAX or DBL_EPSILON will. That''s why they are
macros instead of specified literal values.
Sunner Sun写道:
Sunner Sun wrote:
<嗨!嗨!
我查看了常见问题解答但却一无所获。 :-)
似乎这种宏依赖于平台,不是吗?
Hi!
I have looked through the FAQ but found nothing about it. :-)
It seems that this kind of macro is platform dependent, doesn''t it?
所有标准库宏定义都是取决于平台。
-
pete
All standard library macro definitions are platform dependant.
--
pete
2004年4月1日星期四20:40 :13 - 0500,Sunner Sun写道:
On Thu, 01 Apr 2004 20:40:13 -0500, Sunner Sun wrote:
嗨!
我查看了常见问题解答,但一无所获。 :-)
似乎这种宏依赖于平台,不是吗?
Hi!
I have looked through the FAQ but found nothing about it. :-)
It seems that this kind of macro is platform dependent, doesn''t it?
PATH_MAX可能就是你的'想到了。我不记得那个
标准定义了它,但它不是ANSI C.如果跨平台也不会是
特定值这就是你所说的平台
依赖。
Mike
PATH_MAX is probably what you''re thinking of. I don''t recall which
standard defines it but it isn''t ANSI C. It''s also not going to be a
specific value across platforms if that''s what you mean by "platform
dependant".
Mike
这篇关于ANSI C是否具有PATHMAX或MAX_PATH之类的东西?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!