[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs
From: David Faure <faure () kde ! org>
Date: 2006-05-31 14:01:55
Message-ID: 1149084115.615884.6183.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 546952 by dfaure:
Move those repeated prototypes to a generated kdefakes.h file, which other modules
will be able to use. In kdelibs I just include it in config.h since those functions are
very much used, but maybe in more portable modules we can just include kdefakes.h directly
in the files that need it.
M +2 -149 config.h.cmake
M +4 -0 kdecore/CMakeLists.txt
A kdecore/kdefakes.h.cmake
--- trunk/KDE/kdelibs/config.h.cmake #546951:546952
@@ -160,166 +160,17 @@
#cmakedefine HAVE_DLERROR 1
#cmakedefine HAVE_DLD 1
-/********** HAVE_XXX_PROTO *******************/
-
-#cmakedefine HAVE_STRLCAT_PROTO 1
-#cmakedefine HAVE_STRLCPY_PROTO 1
-#cmakedefine HAVE_RANDOM_PROTO 1
-#cmakedefine HAVE_SRANDOM_PROTO 1
-#cmakedefine HAVE_SETENV_PROTO 1
-#cmakedefine HAVE_UNSETENV_PROTO 1
-#cmakedefine HAVE_USLEEP_PROTO 1
-#cmakedefine HAVE_INITGROUPS_PROTO 1
-#cmakedefine HAVE_MKSTEMPS_PROTO 1
-#cmakedefine HAVE_MKDTEMP_PROTO 1
-#cmakedefine HAVE_MKSTEMP_PROTO 1
-
/********* structs ******************/
#cmakedefine HAVE_STRUCT_UCRED 1
/*********************/
-#if !defined(HAVE_INITGROUPS_PROTO)
-#include <unistd.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-int initgroups(const char *, gid_t);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-
-#if !defined(HAVE_MKDTEMP_PROTO)
-#ifdef __cplusplus
-extern "C" {
-#endif
-char *mkdtemp(char *);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-
-#if !defined(HAVE_MKSTEMPS_PROTO)
-#ifdef __cplusplus
-extern "C" {
-#endif
-int mkstemps(char *, int);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-
-#if !defined(HAVE_MKSTEMP_PROTO)
-#ifdef __cplusplus
-extern "C" {
-#endif
-int mkstemp(char *);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-
-#if !defined(HAVE_RANDOM_PROTO)
-#ifdef __cplusplus
-extern "C" {
-#endif
-long int random(void);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-
-
-#if !defined(HAVE_SETENV_PROTO)
-#ifdef __cplusplus
-extern "C" {
-#endif
-int setenv (const char *, const char *, int);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-
-#if !defined(HAVE_SRANDOM_PROTO)
-#ifdef __cplusplus
-extern "C" {
-#endif
-void srandom(unsigned int);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-
-#if !defined(HAVE_STRLCAT_PROTO)
-#ifdef __cplusplus
-extern "C" {
-#endif
-unsigned long strlcat(char*, const char*, unsigned long);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-
-#if !defined(HAVE_STRLCPY_PROTO)
-#ifdef __cplusplus
-extern "C" {
-#endif
-unsigned long strlcpy(char*, const char*, unsigned long);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-
-#if !defined(HAVE_UNSETENV_PROTO)
-#ifdef __cplusplus
-extern "C" {
-#endif
-int unsetenv (const char *);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-
-#if !defined(HAVE_USLEEP_PROTO)
-#ifdef __cplusplus
-extern "C" {
-#endif
-int usleep (unsigned int);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-
#ifndef HAVE_S_ISSOCK
#define HAVE_S_ISSOCK
#define S_ISSOCK(mode) (1==0)
#endif
-
/*
* Steven Schultz <sms at to.gd-es.com> tells us :
* BSD/OS 4.2 doesn't have a prototype for openpty in its system header files
@@ -366,3 +217,5 @@
/* Defined to 1 if you have a tm_zone member in struct tm */
#cmakedefine HAVE_STRUCT_TM_TM_ZONE 1
+
+#include "kdecore/kdefakes.h"
--- trunk/KDE/kdelibs/kdecore/CMakeLists.txt #546951:546952
@@ -1,5 +1,8 @@
project(kdecore)
+# Generate kdefakes.h
+configure_file(kdefakes.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdefakes.h )
+
# Configure checks for network/ but also for netsupp.*
include(network/ConfigureChecks.cmake)
configure_file(config-network.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-network.h )
@@ -385,5 +388,6 @@
kdedmodule.h
kautostart.h
kprotocolinfo.h
+ kdefakes.h
)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic