aboutsummaryrefslogtreecommitdiff
path: root/src/ext/gnunet-ext.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/gnunet-ext.c')
-rw-r--r--src/ext/gnunet-ext.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/ext/gnunet-ext.c b/src/ext/gnunet-ext.c
index 36fc02b..f18e351 100644
--- a/src/ext/gnunet-ext.c
+++ b/src/ext/gnunet-ext.c
@@ -23,13 +23,42 @@
23 * @brief ext tool 23 * @brief ext tool
24 * @author 24 * @author
25 */ 25 */
26#include <gnunet/platform.h> 26#include "gnunet_ext_config.h"
27#include <stddef.h>
28
29#if WINDOWS
30#define FDTYPE HANDLE
31#define SOCKTYPE SOCKET
32#else
33#define FDTYPE int
34#define SOCKTYPE int
35#endif
36
37#include <gnunet/gettext.h>
27#include <gnunet/gnunet_util_lib.h> 38#include <gnunet/gnunet_util_lib.h>
28#include "gnunet_ext_service.h" 39#include "gnunet_ext_service.h"
29 40
30static int ret; 41static int ret;
31 42
32/** 43/**
44 * This structure holds informations about the project.
45 */
46static const struct GNUNET_OS_ProjectData gnunetext_pd =
47 {
48 .libname = "libgnunetext",
49 .project_dirname = "gnunet-ext",
50 .binary_name = "gnunet-ext",
51 .env_varname = "GNUNET_EXT_PREFIX",
52 .base_config_varname = "GNUNET_EXT_BASE_CONFIG",
53 .bug_email = "gnunet-developers@gnu.org",
54 .homepage = "http://www.gnu.org/s/gnunet/",
55 .config_file = "gnunet-ext.conf",
56 .user_config_file = "~/.config/gnunet-ext.conf",
57 .version = "1.0",
58 .is_gnu = 1,
59 };
60
61/**
33 * Main function that will be run by the scheduler. 62 * Main function that will be run by the scheduler.
34 * 63 *
35 * @param cls closure 64 * @param cls closure
@@ -60,6 +89,9 @@ main (int argc, char *const *argv)
60 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 89 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
61 GNUNET_GETOPT_OPTION_END 90 GNUNET_GETOPT_OPTION_END
62 }; 91 };
92
93 GNUNET_OS_init(&gnunetext_pd);
94
63 return (GNUNET_OK == 95 return (GNUNET_OK ==
64 GNUNET_PROGRAM_run (argc, 96 GNUNET_PROGRAM_run (argc,
65 argv, 97 argv,