[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/win
From: Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date: 2006-02-07 17:28:21
Message-ID: 1139333301.497131.13618.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 506823 by chehrlic:
a lot of small fixes
M +3 -4 include/msvc/stdlib.h
M +4 -2 src/fcntl.c
M +1 -1 src/fsync.c
M +1 -1 src/getenv.c
M +4 -2 src/grp.c
M +3 -2 src/kde_file_win.c
M +2 -1 src/mmap.c
M +7 -9 src/net.c
M +2 -1 src/pwd.c
M +2 -1 src/readdir.c
M +2 -3 src/realpath.c
M +3 -1 src/resource.c
M +1 -1 src/signal.c
M +1 -0 src/src.pro
A src/stdlib.c [License: LGPL (v2+)]
M +2 -1 src/string.c
M +2 -1 src/syslog.c
M +1 -1 src/time.c
M +1 -1 src/uname.c
M +3 -60 src/unistd.c
M +3 -2 src/win32_utils.c
--- trunk/KDE/kdelibs/win/include/msvc/stdlib.h #506822:506823
@@ -22,10 +22,9 @@
*/
#include <winposix_export.h>
-#include <kdelibs_export.h>
/* regular header from msvc includes */
-# include <../include/stdlib.h>
+#include <../include/stdlib.h>
#define __need_size_t
#define __need_wchar_t
@@ -48,9 +47,9 @@
// from kdecore/fakes.c
-KDECORE_EXPORT int setenv(const char *, const char *, int );
+KDEWIN32_EXPORT int setenv(const char *, const char *, int );
-KDECORE_EXPORT void unsetenv(const char *);
+KDEWIN32_EXPORT void unsetenv(const char *);
#ifdef __cplusplus
--- trunk/KDE/kdelibs/win/src/fcntl.c #506822:506823
@@ -17,9 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
-#include "fcntl.h"
+#include <windows.h>
+#include <winposix_export.h>
+#include <fcntl.h>
+
KDEWIN32_EXPORT int fcntl (int fd, int cmd,...)
{
/*! @todo */
--- trunk/KDE/kdelibs/win/src/fsync.c #506822:506823
@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
#include <windows.h>
+#include <winposix_export.h>
#include <io.h>
--- trunk/KDE/kdelibs/win/src/getenv.c #506822:506823
@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
#include <windows.h>
+#include <winposix_export.h>
#include <stdlib.h>
--- trunk/KDE/kdelibs/win/src/grp.c #506822:506823
@@ -17,9 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
-#include "grp.h"
+#include <windows.h>
+#include <winposix_export.h>
+#include< grp.h>
+
/* these functions always fail. for win32 */
KDEWIN32_EXPORT struct group *getgrnam (const char *name)
--- trunk/KDE/kdelibs/win/src/kde_file_win.c #506822:506823
@@ -17,12 +17,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
+#include <windows.h>
+#include <winposix_export.h>
#include <sys/stat.h>
#include <stdarg.h>
-#include "kde_file_win.h"
+#include <kde_file_win.h>
KDEWIN32_EXPORT int kdewin32_stat(const char *file_name, struct stat *buf)
{
--- trunk/KDE/kdelibs/win/src/mmap.c #506822:506823
@@ -20,8 +20,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
#include <windows.h>
+#include <winposix_export.h>
+#include <windows.h>
#include <sys/mman.h>
#include <assert.h>
--- trunk/KDE/kdelibs/win/src/net.c #506822:506823
@@ -17,11 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
+#include <windows.h>
+#include <winposix_export.h>
+
#include <sys/types.h>
-KDEWIN32_EXPORT unsigned long int
-htonl (unsigned long int x)
+KDEWIN32_EXPORT unsigned long int htonl (unsigned long int x)
{
return ((((x & 0x000000ffU) << 24) |
((x & 0x0000ff00U) << 8) |
@@ -29,21 +30,18 @@
((x & 0xff000000U) >> 24)));
}
-KDEWIN32_EXPORT unsigned long int
-ntohl (unsigned long int x)
+KDEWIN32_EXPORT unsigned long int ntohl (unsigned long int x)
{
return htonl (x);
}
-KDEWIN32_EXPORT unsigned short
-htons (unsigned short x)
+KDEWIN32_EXPORT unsigned short htons (unsigned short x)
{
return ((((x & 0x000000ffU) << 8) |
((x & 0x0000ff00U) >> 8)));
}
-KDEWIN32_EXPORT unsigned short
-ntohs (unsigned short x)
+KDEWIN32_EXPORT unsigned short ntohs (unsigned short x)
{
return htons (x);
}
--- trunk/KDE/kdelibs/win/src/pwd.c #506822:506823
@@ -17,7 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
+#include <windows.h>
+#include <winposix_export.h>
#include <stdlib.h>
#include <pwd.h>
--- trunk/KDE/kdelibs/win/src/readdir.c #506822:506823
@@ -56,7 +56,8 @@
* University of Illinois, Urbana-Champaign.
*/
-#include <kdelibs_export.h>
+#include <windows.h>
+#include <winposix_export.h>
#include <malloc.h>
#include <string.h>
--- trunk/KDE/kdelibs/win/src/realpath.c #506822:506823
@@ -17,7 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
+#include <windows.h>
+#include <winposix_export.h>
#include <stdlib.h>
#include <unistd.h>
@@ -26,8 +27,6 @@
#include <errno.h>
#include <sys/stat.h>
-#include "unistd.h"
-
/**
* @internal Canonical name: never ends with a slash
*/
--- trunk/KDE/kdelibs/win/src/resource.c #506822:506823
@@ -17,7 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
+#include <windows.h>
+#include <winposix_export.h>
+
#include <sys/resource.h>
/* these functions always fail. for win32 */
--- trunk/KDE/kdelibs/win/src/signal.c #506822:506823
@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
#include <windows.h>
+#include <winposix_export.h>
#include <sys/types.h>
#include <errno.h>
--- trunk/KDE/kdelibs/win/src/src.pro #506822:506823
@@ -25,6 +25,7 @@
readdir.c \
resource.c \
signal.c \
+stdlib.c \
string.c \
syslog.c \
time.c \
--- trunk/KDE/kdelibs/win/src/string.c #506822:506823
@@ -17,7 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
+#include <windows.h>
+#include <winposix_export.h>
#include <stdlib.h>
#include <string.h>
--- trunk/KDE/kdelibs/win/src/syslog.c #506822:506823
@@ -17,7 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <kdelibs_export.h>
+#include <windows.h>
+#include <winposix_export.h>
#include "syslog.h"
--- trunk/KDE/kdelibs/win/src/time.c #506822:506823
@@ -19,7 +19,7 @@
*/
#include <windows.h>
-#include <kdelibs_export.h>
+#include <winposix_export.h>
#include <time.h>
#include <sys/time.h>
--- trunk/KDE/kdelibs/win/src/uname.c #506822:506823
@@ -18,7 +18,7 @@
*/
#include <windows.h>
-#include <kdelibs_export.h>
+#include <winposix_export.h>
#include <sys/utsname.h>
#include <stdio.h>
--- trunk/KDE/kdelibs/win/src/unistd.c #506822:506823
@@ -17,10 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#define _WINSOCKAPI_ /* skip winsock */
-
#include <windows.h>
-#include <kdelibs_export.h>
+#include <winposix_export.h>
#include <unistd.h>
#include <sys/stat.h>
@@ -264,62 +262,7 @@
return mkstemps( _template, 0 );
}
-
// from kdecore/fakes.c
-KDEWIN32_EXPORT int setenv(const char *name, const char *value, int overwrite) {
- int i;
- char * a;
-
- if (!overwrite && getenv(name)) return 0;
-
- i = strlen(name) + strlen(value) + 2;
- a = (char*)malloc(i);
- if (!a) return 1;
-
- strcpy(a, name);
- strcat(a, "=");
- strcat(a, value);
-
- return putenv(a);
-}
-
-
-// from kdecore/fakes.c
-#ifndef environ
-extern char ** environ;
-#endif
-KDEWIN32_EXPORT void unsetenv (name)
- const char *name;
-{
- size_t len;
- char **ep;
-
- if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
- {
- errno = EINVAL;
- return;
- }
-
- len = strlen (name);
-
- ep = environ;
- while (*ep != NULL)
- if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
- {
- /* Found it. Remove this pointer by moving later ones back. */
- char **dp = ep;
-
- do
- dp[0] = dp[1];
- while (*dp++);
- /* Continue the loop in case NAME appears again. */
- }
- else
- ++ep;
-
-}
-
-// from kdecore/fakes.c
int seteuid(uid_t euid)
{
return setreuid(-1, euid); /* Well, if you have neither you are in trouble :) */
@@ -376,8 +319,8 @@
with (module 2^32). */
value += 7777;
- if (!kdewin32_mkdir(_template,0700))
- return _template;
+ if (!mkdir(_template))
+ return _template;
}
return 0;
}
--- trunk/KDE/kdelibs/win/src/win32_utils.c #506822:506823
@@ -19,8 +19,8 @@
// helper functions
-#include <kdelibs_export.h>
-#include "win32_utils.h"
+#include <windows.h>
+#include <winposix_export.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -28,6 +28,7 @@
#include <string.h>
#include <errno.h>
#include <signal.h>
+#include <win32_utils.h>
//---------------------------------------------
#define _fcopy_BUFLEN 1024*32
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic