diff options
-rw-r--r-- | src/ext/ext_api.c | 12 | ||||
-rw-r--r-- | src/ext/gnunet-ext.c | 34 | ||||
-rw-r--r-- | src/ext/gnunet-service-ext.c | 12 | ||||
-rw-r--r-- | src/ext/test_ext_api.c | 12 |
4 files changed, 66 insertions, 4 deletions
diff --git a/src/ext/ext_api.c b/src/ext/ext_api.c index 65637d5..365dd89 100644 --- a/src/ext/ext_api.c +++ b/src/ext/ext_api.c | |||
@@ -23,7 +23,17 @@ | |||
23 | * @brief API for ext | 23 | * @brief API for ext |
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 | |||
27 | #include <gnunet/gnunet_util_lib.h> | 37 | #include <gnunet/gnunet_util_lib.h> |
28 | #include "gnunet_ext_service.h" | 38 | #include "gnunet_ext_service.h" |
29 | 39 | ||
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 | ||
30 | static int ret; | 41 | static int ret; |
31 | 42 | ||
32 | /** | 43 | /** |
44 | * This structure holds informations about the project. | ||
45 | */ | ||
46 | static 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, |
diff --git a/src/ext/gnunet-service-ext.c b/src/ext/gnunet-service-ext.c index d292eac..aa43933 100644 --- a/src/ext/gnunet-service-ext.c +++ b/src/ext/gnunet-service-ext.c | |||
@@ -23,7 +23,17 @@ | |||
23 | * @brief ext service implementation | 23 | * @brief ext service implementation |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
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 | |||
27 | #include <gnunet/gnunet_util_lib.h> | 37 | #include <gnunet/gnunet_util_lib.h> |
28 | #include "gnunet_protocols_ext.h" | 38 | #include "gnunet_protocols_ext.h" |
29 | 39 | ||
diff --git a/src/ext/test_ext_api.c b/src/ext/test_ext_api.c index 75a7cc4..e69dca0 100644 --- a/src/ext/test_ext_api.c +++ b/src/ext/test_ext_api.c | |||
@@ -21,7 +21,17 @@ | |||
21 | * @file ext/test_ext_api.c | 21 | * @file ext/test_ext_api.c |
22 | * @brief testcase for ext_api.c | 22 | * @brief testcase for ext_api.c |
23 | */ | 23 | */ |
24 | #include <gnunet/platform.h> | 24 | #include "gnunet_ext_config.h" |
25 | #include <stddef.h> | ||
26 | |||
27 | #if WINDOWS | ||
28 | #define FDTYPE HANDLE | ||
29 | #define SOCKTYPE SOCKET | ||
30 | #else | ||
31 | #define FDTYPE int | ||
32 | #define SOCKTYPE int | ||
33 | #endif | ||
34 | |||
25 | #include <gnunet/gnunet_util_lib.h> | 35 | #include <gnunet/gnunet_util_lib.h> |
26 | #include "gnunet_ext_service.h" | 36 | #include "gnunet_ext_service.h" |
27 | 37 | ||