and __SILC_ENABLE_DEBUG for third-party software.
server names in client library. Affected files in
lib/silcclient/.
+ * Added __SILC_HAVE_PTHREAD, __SILC_HAVE_SIM, __SILC_HAVE_LIBIDN,
+ and __SILC_ENABLE_DEBUG to include/silcclient.h for third-party
+ software to check how Toolkit has been compiled.
+
Wed Mar 30 22:16:35 EEST 2005 Pekka Riikonen <priikone@silcnet.org>
* Added silc_utf8_str[n]casecmp into lib/silcutil/silcutf8.[ch].
TODO/bugs In SILC Libraries
===========================
- o Stringprep checks to the Client Library.
-
- o Add following defines in silcincludes.h and silcclient.h for
- third-party software:
-
- __SILC_LIBSILC_HAVE_PTHREAD
- __SILC_LIBSILC_HAVE_SIM
- __SILC_LIBSILC_ENABLE_DEBUG
- __SILC_LIBSILCCLIENT_HAVE_PTHREAD
- __SILC_LIBSILCCLIENT_HAVE_SIM
- __SILC_LIBSILCCLIENT_ENABLE_DEBUG
-
o Test cases for all payload encoding and decoding routins in lib/silccore/
o Test cases for math library routines in lib/silcmath/
goto out;
}
+ if (!silc_utf8_valid(tmp, strlen(tmp))) {
+ silc_server_command_send_status_reply(cmd, SILC_COMMAND_TOPIC,
+ SILC_STATUS_ERR_NOT_ENOUGH_PARAMS,
+ 0);
+ goto out;
+ }
+
/* See whether the client is on channel and has rights to change topic */
if (!silc_server_client_on_channel(client, channel, &chl)) {
tmp = silc_argument_get_arg_type(cmd->args, 1, &tmp_len);
#
# Author: Pekka Riikonen <priikone@silcnet.org>
#
-# Copyright (C) 2000 - 2004 Pekka Riikonen
+# Copyright (C) 2000 - 2005 Pekka Riikonen
#
# 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 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
])
])
+__SILC_HAVE_SIM=""
AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue)
if test x$sim_support = xtrue; then
AC_MSG_RESULT(Enabled SIM support.)
+ __SILC_HAVE_SIM="#define __SILC_HAVE_SIM 1"
else
AC_MSG_RESULT(No SIM support found.)
fi
#
AC_MSG_CHECKING(whether to enable debugging)
summary_debug="no"
+__SILC_ENABLE_DEBUG=""
AC_ARG_ENABLE(debug,
[ --enable-debug enable debugging],
[
AC_MSG_RESULT(yes)
AC_DEFINE(SILC_DEBUG)
summary_debug="yes"
+ __SILC_ENABLE_DEBUG="#define __SILC_ENABLE_DEBUG 1"
;;
*)
AC_MSG_RESULT(no)
done
fi
+__SILC_HAVE_LIBIDN=""
+if test x$has_libidn = xtrue; then
+ __SILC_HAVE_LIBIDN="#define __SILC_HAVE_LIBIDN 1"
+fi
# iconv support
#
has_threads=false
fi
+__SILC_HAVE_PTHREAD=""
AM_CONDITIONAL(SILC_THREADS, test x$has_threads = xtrue)
if test x$has_threads = xtrue; then
CFLAGS="$CFLAGS -D_REENTRANT"
AC_CHECK_FUNC(pthread_create)
AC_DEFINE(SILC_HAVE_PTHREAD)
AC_DEFINE(SILC_THREADS)
+ __SILC_HAVE_PTHREAD="#define __SILC_HAVE_PTHEAD 1"
fi
# Native WIN32 compilation under cygwin
# Included configure scripts
AD_INCLUDE_CONFIGURE
+AC_SUBST(__SILC_HAVE_PTHREAD)
+AC_SUBST(__SILC_HAVE_SIM)
+AC_SUBST(__SILC_HAVE_LIBIDN)
+AC_SUBST(__SILC_ENABLE_DEBUG)
+
#
# Makefile outputs
#
Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2003 Pekka Riikonen
+ Copyright (C) 1997 - 2005 Pekka Riikonen
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
#define SILC_SIZEOF_CHAR @SILC_SIZEOF_CHAR@
#define SILC_SIZEOF_VOID_P @SILC_SIZEOF_VOID_P@
+/* Compilation time defines, for third-party software */
+@__SILC_HAVE_PTHREAD@
+@__SILC_HAVE_SIM@
+@__SILC_HAVE_LIBIDN@
+@__SILC_ENABLE_DEBUG@
+
#if defined(HAVE_SILCDEFS_H)
/* Automatically generated configuration header */
#include "silcdefs.h"