Added autodetecting to appropriate use of silc_va_copy.
[runtime.git] / lib / silcutil / silcutil.h
index 14e6adf53a59724c28a2f4af4f05c1dbf8cd74fe..0b8a4250e77824333c7fba575461cc07e42a6dc5 100644 (file)
@@ -223,15 +223,7 @@ char *silc_get_real_name();
  *    each copied list.
  *
  ***/
-#if defined(HAVE_VA_COPY)
-#define silc_va_copy(dest, src) va_copy(dest, src);
-#elif defined(HAVE___VA_COPY)
-#define silc_va_copy(dest, src) __va_copy(dest, src);
-#elif defined(SILC_VA_COPY_ARRAY)
-#define silc_va_copy(dest, src) memmove(dest, src, sizeof(va_list));
-#else
-#define silc_va_copy(dest, src) dest = src;
-#endif
+#define silc_va_copy(dest, src) __SILC_VA_COPY(dest, src)
 
 /****f* silcutil/silc_hexdump
  *
@@ -281,4 +273,18 @@ SilcBool silc_hex2data(const char *hex, unsigned char *data,
 SilcBool silc_data2hex(const unsigned char *data, SilcUInt32 data_len,
                       char *hex, SilcUInt32 hex_size);
 
+/****f* silcutil/silc_get_num_cpu
+ *
+ * SYNOPSIS
+ *
+ *    int silc_get_num_cpu(void);
+ *
+ * DESCRIPTION
+ *
+ *    Returns the number of CPU cores in the current machine.  Returns 0
+ *    if the routine could not determine the number of cores.
+ *
+ ***/
+int silc_get_num_cpu(void);
+
 #endif /* !SILCUTIL_H */