1 /* This file is part of the KDE libraries
2 Copyright (c) 2006 The KDE Project
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
22 /* This file defines the prototypes for a few system calls for platforms which either
23 1) have those system calls, but lack the prototypes in their header files.
24 2) don't have those system calls, in which case kdecore provides those functions.
26 You should include this file in any .cpp file that uses at least one of those functions:
31 random, srandom (this is for KRandom itself, prefer using KRandom in any other code)
32 mkdtemp (this is for KTempDir itself, prefer using KTempDir everywhere else)
33 mkstemp, mkstemps (prefer to use QTemporaryfile instead)
38 #cmakedefine HAVE_STRLCAT_PROTO 1
39 #if !defined(HAVE_STRLCAT_PROTO)
43 unsigned long strlcat(char*, const char*, unsigned long);
49 #cmakedefine HAVE_STRLCPY_PROTO 1
50 #if !defined(HAVE_STRLCPY_PROTO)
54 unsigned long strlcpy(char*, const char*, unsigned long);
60 #cmakedefine HAVE_STRCASESTR_PROTO 1
61 #if !defined(HAVE_STRCASESTR_PROTO)
65 char *strcasestr(const char *str1, const char *str2);
71 #cmakedefine HAVE_RANDOM_PROTO 1
72 #if !defined(HAVE_RANDOM_PROTO)
76 long int random(void);
82 #cmakedefine HAVE_SRANDOM_PROTO 1
83 #if !defined(HAVE_SRANDOM_PROTO)
87 void srandom(unsigned int);
93 #cmakedefine HAVE_SETENV_PROTO 1
94 #if !defined(HAVE_SETENV_PROTO)
98 int setenv (const char *, const char *, int);
104 #cmakedefine HAVE_UNSETENV_PROTO 1
105 #if !defined(HAVE_UNSETENV_PROTO)
109 int unsetenv (const char *);
115 #cmakedefine HAVE_USLEEP_PROTO 1
116 #if !defined(HAVE_USLEEP_PROTO)
120 int usleep (unsigned int);
126 #cmakedefine HAVE_INITGROUPS_PROTO 1
127 #if !defined(HAVE_INITGROUPS_PROTO)
132 int initgroups(const char *, gid_t);
138 #cmakedefine HAVE_MKDTEMP_PROTO 1
139 #if !defined(HAVE_MKDTEMP_PROTO)
143 char *mkdtemp(char *);
149 #cmakedefine HAVE_MKSTEMPS_PROTO 1
150 #if !defined(HAVE_MKSTEMPS_PROTO)
154 int mkstemps(char *, int);
160 #cmakedefine HAVE_MKSTEMP_PROTO 1
161 #if !defined(HAVE_MKSTEMP_PROTO)
171 #cmakedefine HAVE_TRUNC 1
172 #if !defined(HAVE_TRUNC)
176 double trunc(double);
182 #endif /* KDEFAKES_H */