[vlc-devel] [PATCH] WinCE: remove call to unsupported getcwd()

Pierre Ynard linkfanel at yahoo.fr
Tue May 19 10:48:25 CEST 2009


> #ifdefs do clutter up the code something fierce, so (static inline)
> wrapper functions would indeed be preferrable. You indicated you
> seemed to think this particular fix was not elegible for such
> treatment somehow. Would you care to explain why?

Because in this case the wrapper function would look like:

char *getcwd(char *buf, size_t size)
{
#ifdef UNDER_CE
    return strncpy(buf, "\\My Documents", size);
#endif
}

It's semantically very wrong and not reusable, I doubt you want that.

-- 
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."



More information about the vlc-devel mailing list