Change in libosmocore[master]: use reasonable value if PATH_MAX is not defined
Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/9202 ) Change subject: use reasonable value if PATH_MAX is not defined .. Abandoned no progress since september on a trivial change for obscure operating systems we don't support anyway :/ -- 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: abandon Gerrit-Change-Id: Ia884f4c96b4c4eaa1a1be256e3ccda0b4dec4099 Gerrit-Change-Number: 9202 Gerrit-PatchSet: 1 Gerrit-Owner: Thorsten Alteholz Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte
Change in libosmocore[master]: use reasonable value if PATH_MAX is not defined
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: any interest in reworking this as suggested? -- 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 Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-Comment-Date: Fri, 28 Sep 2018 23:20:21 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in libosmocore[master]: use reasonable value if PATH_MAX is not defined
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 ]], [[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 AlteholzGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-Comment-Date: Thu, 17 May 2018 09:39:50 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in libosmocore[master]: use reasonable value if PATH_MAX is not defined
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: or well, it is actually, if we are about to pass that path into a syscall: https://eklitzke.org/path-max-is-tricky (both links just general FYI, not requiring/requesting any change to the current patch) -- 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 AlteholzGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-Comment-Date: Thu, 17 May 2018 07:17:49 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in libosmocore[master]: use reasonable value if PATH_MAX is not defined
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: slightly off-topic: PATH_MAX doesn't seem to be such a great idea to beg in with :/ http://insanecoding.blogspot.de/2007/11/pathmax-simply-isnt.html -- 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 AlteholzGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-Comment-Date: Thu, 17 May 2018 07:16:00 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in libosmocore[master]: use reasonable value if PATH_MAX is not defined
Vadim Yanitskiy 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: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/9202/1/src/plugin.c File src/plugin.c: https://gerrit.osmocom.org/#/c/9202/1/src/plugin.c@53 PS1, Line 53: char fname[4096]; And also, it is better to define a macro once if it isn't defined, instead of checking this each location... -- 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 AlteholzGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 16 May 2018 22:48:27 + Gerrit-HasComments: Yes Gerrit-HasLabels: Yes
Change in libosmocore[master]: use reasonable value if PATH_MAX is not defined
Pau Espin Pedrol 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: Have a look at ./include/osmocom/core/timer_compat.h, we do similar things for time related stuff. -- 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 AlteholzGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 16 May 2018 14:31:59 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in libosmocore[master]: use reasonable value if PATH_MAX is not defined
Pau Espin Pedrol 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: Code-Review-1 We probably use PATH_MAX in several places, so I think it's better to create a new OSMO_PATH_MAX in some header file, and then use that one everywhere needed. -- 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 AlteholzGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 16 May 2018 14:31:28 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in libosmocore[master]: use reasonable value if PATH_MAX is not defined
Thorsten Alteholz has uploaded this change for review. ( https://gerrit.osmocom.org/9202 Change subject: use reasonable value if PATH_MAX is not defined .. use reasonable value if PATH_MAX is not defined In case PATH_MAX is not defined, which happens for example on non Linux systems like Hurd, use a reasonable value, like the one from Linux. Change-Id: Ia884f4c96b4c4eaa1a1be256e3ccda0b4dec4099 --- M src/plugin.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/02/9202/1 diff --git a/src/plugin.c b/src/plugin.c index 40de4f8..bffdc97 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -46,7 +46,12 @@ int osmo_plugin_load_all(const char *directory) { unsigned int num = 0; +/* in case PATH_MAX is not defined, use the value from linux */ +#ifdef PATH_MAX char fname[PATH_MAX]; +#else + char fname[4096]; +#endif DIR *dir; struct dirent *entry; -- 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: newchange Gerrit-Change-Id: Ia884f4c96b4c4eaa1a1be256e3ccda0b4dec4099 Gerrit-Change-Number: 9202 Gerrit-PatchSet: 1 Gerrit-Owner: Thorsten Alteholz