Change in libosmocore[master]: use reasonable value if PATH_MAX is not defined

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu May 17 09:39:50 UTC 2018


Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/9202 )

Change subject: use reasonable value if PATH_MAX is not defined
......................................................................


Patch Set 1:

Actually,  I think this ultimately belongs into autoconf:

# Some Unix systems, like Gnu Hurd, don't define PATH_MAX
AC_MSG_CHECKING([for PATH_MAX])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <limits.h>]],
                                    [[char dummy[PATH_MAX];]])],
                   [
                      AC_MSG_RESULT([yes])
                      AC_DEFINE_UNQUOTED([HAVE_PATH_MAX], 1, [Define to 1 if you have the PATH_MAX macro.])
                    ],
                    [
                      AC_MSG_RESULT([no])
                      AC_DEFINE_UNQUOTED([HAVE_PATH_MAX], 0, [Define to 1 if you have the PATH_MAX macro.])
                    ]
                 )

and then we can have (in a shared header)

#if HAVE_PATH_MAX=0
#define PATH_MAX 4096
#endif


-- 
To view, visit https://gerrit.osmocom.org/9202
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia884f4c96b4c4eaa1a1be256e3ccda0b4dec4099
Gerrit-Change-Number: 9202
Gerrit-PatchSet: 1
Gerrit-Owner: Thorsten Alteholz <osmocom at alteholz.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-CC: Harald Welte <laforge at gnumonks.org>
Gerrit-Comment-Date: Thu, 17 May 2018 09:39:50 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180517/7c503e84/attachment.htm>


More information about the gerrit-log mailing list