- Allocate buffer large enough to contain UNIX_PATH_MAX size pathnames in case of...
[oweals/gnunet.git] / src / util / getopt.c
index 415bb4b6b742cae7f1cf8f32e9cc25d4836287a3..7b2f3cf5d9d8d96cec3b1c457e501284b542668c 100644 (file)
@@ -11,7 +11,7 @@ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
 
 This program is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
+Free Software Foundation; either version 3, or (at your option) any
 later version.
 
 This program is distributed in the hope that it will be useful,
@@ -37,10 +37,8 @@ Copyright (C) 2006 Christian Grothoff
  * replace main GNU getopt parser with one that
  * actually fits our API.
  */
-
 #include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_getopt_lib.h"
+#include "gnunet_util_lib.h"
 
 #ifdef VMS
 #include <unixlib.h>
@@ -939,8 +937,10 @@ GNUNET_GETOPT_run (const char *binaryOptions,
 
   GNUNET_free (shorts);
   GNUNET_free (long_options);
-  if (cont == GNUNET_SYSERR)
-    return GNUNET_SYSERR;
+  if (cont != GNUNET_OK)
+  {
+    return cont;
+  }
   return GNoptind;
 }