From e08a8d18dc0b1a1dbe89485a59791cfe513d22d0 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 2 Jun 2012 14:39:13 +0000 Subject: [PATCH] LRN: Update plibc and utf8ization --- configure.ac | 4 ++-- src/include/plibc.h | 7 ++++++- src/util/server.c | 5 +++-- src/util/winproc.c | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 95b10be7b..2a8d61261 100644 --- a/configure.ac +++ b/configure.ac @@ -22,13 +22,13 @@ # AC_PREREQ(2.61) # Checks for programs. -AC_INIT([gnunet], [0.9.2],[bug-gnunet@gnu.org]) +AC_INIT([gnunet], [0.9.3],[bug-gnunet@gnu.org]) AC_CANONICAL_TARGET AC_CANONICAL_HOST AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE([gnunet], [0.9.2]) +AM_INIT_AUTOMAKE([gnunet], [0.9.3]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_HEADERS([gnunet_config.h]) AH_TOP([#define _GNU_SOURCE 1]) diff --git a/src/include/plibc.h b/src/include/plibc.h index 70cbd9e81..1cb84e6b7 100644 --- a/src/include/plibc.h +++ b/src/include/plibc.h @@ -22,7 +22,7 @@ * @brief PlibC header * @attention This file is usually not installed under Unix, * so ship it with your application - * @version $Revision$ + * @version $Revision: 84 $ */ #ifndef _PLIBC_H_ @@ -336,9 +336,13 @@ typedef struct #define SetErrnoFromWinError(e) _SetErrnoFromWinError(e, __FILE__, __LINE__) BOOL _plibc_CreateShortcut(const char *pszSrc, const char *pszDest); +BOOL _plibc_CreateShortcutW(const wchar_t *pwszSrc, const wchar_t *pwszDest); BOOL _plibc_DereferenceShortcut(char *pszShortcut); +BOOL _plibc_DereferenceShortcutW(wchar_t *pwszShortcut); char *plibc_ChooseDir(char *pszTitle, unsigned long ulFlags); +wchar_t *plibc_ChooseDirW(wchar_t *pwszTitle, unsigned long ulFlags); char *plibc_ChooseFile(char *pszTitle, unsigned long ulFlags); +wchar_t *plibc_ChooseFileW(wchar_t *pwszTitle, unsigned long ulFlags); long QueryRegistry(HKEY hMainKey, const char *pszKey, const char *pszSubKey, char *pszBuffer, long *pdLength); @@ -376,6 +380,7 @@ const char *inet_ntop(int af, const void *src, char *dst, size_t size); struct tm *gmtime_r(const time_t *clock, struct tm *result); int plibc_init(char *pszOrg, char *pszApp); +int plibc_init_utf8(char *pszOrg, char *pszApp, int utf8_mode); void plibc_shutdown(); int plibc_initialized(); diff --git a/src/util/server.c b/src/util/server.c index d639f65b5..e25ada304 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -819,7 +819,7 @@ warn_no_receive_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_break (0 != client->warn_type); /* type should never be 0 here, as we don't use 0 */ client->warn_task = - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &warn_no_receive_done, client); if (0 == (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) LOG (GNUNET_ERROR_TYPE_WARNING, @@ -907,7 +907,7 @@ GNUNET_SERVER_inject (struct GNUNET_SERVER_Handle *server, GNUNET_break (0 != type); /* type should never be 0 here, as we don't use 0 */ sender->warn_start = GNUNET_TIME_absolute_get (); sender->warn_task = - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &warn_no_receive_done, sender); sender->warn_type = type; } @@ -1389,6 +1389,7 @@ GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client) (void) GNUNET_SCHEDULER_add_now (&destroy_connection, client->connection); GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == client->warn_task); + GNUNET_assert (GNUNET_NO == client->receive_pending); GNUNET_free (client); /* we might be in soft-shutdown, test if we're done */ if (NULL != server) diff --git a/src/util/winproc.c b/src/util/winproc.c index f49c445e5..b75fc86db 100644 --- a/src/util/winproc.c +++ b/src/util/winproc.c @@ -145,7 +145,7 @@ GNInitWinEnv () plibc_initialized (); plibc_set_panic_proc (plibc_panic); - ret = plibc_init ("GNU", PACKAGE); + ret = plibc_init_utf8 ("GNU", PACKAGE, 1); /* don't load other DLLs twice */ if (hNTDLL) -- 2.25.1