Mailinglist Archive: opensuse-packaging (111 mails)

< Previous Next >
Re: [opensuse-packaging] FYI: glibc 2.8 may break some of your packages
  • From: Michal Marek <mmarek@xxxxxxx>
  • Date: Mon, 14 Apr 2008 14:53:29 +0200
  • Message-id: <480353C9.3070305@xxxxxxx>
Cristian Rodríguez wrote:
#include <unistd.h> /* only if not already there !! */

#if defined(_SC_ARG_MAX)
# if defined(ARG_MAX)
# undef ARG_MAX
# endif
# define ARG_MAX sysconf (_SC_ARG_MAX)
#endif

Any POSIX guru around to enlighten me about the proper usage of
_PC_PATH_MAX? If I want to know the maximum length of any absolute
pathname the application might possibly deal with, then the correct
formula is

#define PATH_MAX pathconf("/", _PC_PATH_MAX)

? The manpage says

_PC_PATH_MAX
returns the maximum length of a relative pathname when path or
filedes is the current working directory. The corresponding
macro is _POSIX_PATH_MAX.

which isn't quite clear to me (do I have to add 1 for the leading slash
and 1 for the terminating nul byte?). Also, in what case is this value
different from 4096 on linux?

thanks,
Michal
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References