[vorbis-dev] win32 question

Jeff Squyres jsquyres at lsc.nd.edu
Mon Feb 19 06:51:28 PST 2001



On Mon, 19 Feb 2001, berk wrote:

> Well, DJGPP does :) But mingw32 doesn't. So at least one win32
> compiler does NOT have it already.

I don't even know what DJGPP and mingw32 are -- I assume those are windows
compilers.  :-)

> Isn't it better to do
>
> #ifdef win32
> #define PATHNAME_MAX NAME_MAX  // it was called PATHNAME_MAX IIRC
> #else
> //nothing to do
> #endif

The source code for ogg123.c uses NAME_MAX.  I quoted POSIX about the use
of NAME_MAX in an earlier post.  See
http://www.xiph.org/archives/vorbis-dev/200101/0380.html.

Also, there are POSIX systems that do not have NAME_MAX because it is not
accurate.  For example, neither NAME_MAX nor PATHNAME_MAX are defined on
Solaris.

The fact of the matter is that different filesystems have different
maximum filename lengths.  That's what pathconf() is for -- you give it a
path and it gives you the maximum filename length on that filesystem.

-----

This discussion could be avoided with the rationale that it would be
really silly to have a $HOME that is so long that you can't have a file
named ".ogg123rc" in it.  Hence, (strlen(homedir) + 11) is most likely
going to be less than whatever the max is for that filesystem.  And if it
isn't, the user has such a bozoed system that they shouldn't be using
ogg123, anyway.  :-)

{+} Jeff Squyres
{+} squyres at cse.nd.edu
{+} Perpetual Obsessive Notre Dame Student Craving Utter Madness
{+} "I came to ND for 4 years and ended up staying for a decade"

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list