Hi, I've been working through these patches and don't think this one is needed.
MAXNAMLEN is defined in dirent.h and check if NAME_MAX is defined or not. Because of this the include to limits.h also isn't needed. I've tested this on the commandline using gcc 4.3.6 (on a Fedora 16 system), I'll also check out Eclipse, but errors/warnings given by Eclipse seem to be an Eclipse path problem. I am not sure wether we should try to fix this or not, since the Eclipse project is messy to maintain in a repository since every system can have different include paths. CMake can also generate an Eclipse project using the configured path. If time permits, I'll take a look into that. 2012/7/13 Ferry Huberts <[email protected]> > From: Ferry Huberts <[email protected]> > > Signed-off-by: Ferry Huberts <[email protected]> > --- > deployment_admin/private/src/deployment_admin.c | 6 ++++-- > shell/update_command.c | 4 +++- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/deployment_admin/private/src/deployment_admin.c > b/deployment_admin/private/src/deployment_admin.c > index 5065b5f..de0333f 100644 > --- a/deployment_admin/private/src/deployment_admin.c > +++ b/deployment_admin/private/src/deployment_admin.c > @@ -12,6 +12,8 @@ > #include <curl/easy.h> > #include <apr_strings.h> > > +#include <linux/limits.h> > + > #include "deployment_admin.h" > #include "celix_errno.h" > #include "bundle_context.h" > @@ -115,13 +117,13 @@ static void *APR_THREAD_FUNC > deploymentAdmin_poll(apr_thread_t *thd, void *deplo > request = apr_pstrcat(admin->pool, > admin->pollUrl, "/", last, NULL); > } > > - char inputFile[MAXNAMLEN]; > + char inputFile[NAME_MAX]; > inputFile[0] = '\0'; > char *test = inputFile; > celix_status_t status = > deploymentAdmin_download(request, &test); > if (status == CELIX_SUCCESS) { > // Handle file > - char tmpDir[MAXNAMLEN]; > + char tmpDir[NAME_MAX]; > tmpDir[0] = '\0'; > tmpnam(tmpDir); > > diff --git a/shell/update_command.c b/shell/update_command.c > index aab412e..62c455d 100644 > --- a/shell/update_command.c > +++ b/shell/update_command.c > @@ -28,6 +28,8 @@ > #include <curl/curl.h> > #include <curl/easy.h> > > +#include <linux/limits.h> > + > #include "command_private.h" > #include "array_list.h" > #include "bundle_context.h" > @@ -65,7 +67,7 @@ void updateCommand_execute(COMMAND command, char * line, > void (*out)(char *), vo > bundleContext_getBundleById(command->bundleContext, id, > &bundle); > if (bundle != NULL) { > sub = strtok(NULL, delims); > - char inputFile[MAXNAMLEN]; > + char inputFile[NAME_MAX]; > inputFile[0] = '\0'; > if (sub != NULL) { > printf("URL: %s\n", sub); > -- > 1.7.10.4 > > -- Met vriendelijke groet, Alexander Broekhuis
