Re: Proposition for platform maximum filename/pathname length symbols
- From: Sebastian Rittau <srittau jroger in-berlin de>
- To: gtk-devel-list gnome org
- Subject: Re: Proposition for platform maximum filename/pathname length symbols
- Date: Sun, 25 Dec 2005 15:12:57 +0100
On Sat, Dec 24, 2005 at 01:18:29AM -0000, Chris Morrison wrote:
> I would like to make a suggestion for a small but useful addition GLib,
> which I think is a glaring omission and which I have found myself needing
> for a current development project.
>
>
>
> I propose that the following symbols be defined and available to programs
> compiled against GLib:
>
>
>
> G_MAX_PATH_LENGTH
>
> G_MAX_FILENAME_LENGTH
>
>
>
> The purpose of these should be self-explanatory; G_MAX_PATH_LENGTH would be
> defined as the maximum length in bytes a pathname can be (e.g. PATH_MAX
> under Linux and MAX_PATH under Windoze). G_MAX_FILENAME_LENGTH would be the
> maximum length of a single filename (if different).
>
>
>
> Has anyone else been frustrated by the absence of such symbols or have I
> missed something?
Please note that some systems (e.g. GNU/Hurd AFAIK) do not have a
maximum path length. If you need to use such a macro, you should really
reconsider your code and evaluate using a dynamically allocated buffer.
- Sebastian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]