HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support MSVC build with newer versions of Visual Studio.
[bpt/emacs.git]
/
src
/
s
/
ms-w32.h
diff --git
a/src/s/ms-w32.h
b/src/s/ms-w32.h
index
826a02b
..
519f6e7
100644
(file)
--- a/
src/s/ms-w32.h
+++ b/
src/s/ms-w32.h
@@
-1,7
+1,6
@@
/* System description file for Windows NT.
/* System description file for Windows NT.
-Copyright (C) 1993, 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1993-1995, 2001-2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
This file is part of GNU Emacs.
@@
-87,6
+86,12
@@
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
#include <sys/types.h>
#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
#include <sys/types.h>
+
+#ifdef _MSC_VER
+typedef unsigned long sigset_t;
+typedef int ssize_t;
+#endif
+
struct sigaction {
int sa_flags;
void (*sa_handler)(int);
struct sigaction {
int sa_flags;
void (*sa_handler)(int);
@@
-112,11
+117,7
@@
struct sigaction {
#undef HAVE_UTIME_H
#undef HAVE_LINUX_VERSION_H
#undef HAVE_SYS_SYSTEMINFO_H
#undef HAVE_UTIME_H
#undef HAVE_LINUX_VERSION_H
#undef HAVE_SYS_SYSTEMINFO_H
-#define HAVE_LIMITS_H 1
-#define HAVE_STRING_H 1
-#define HAVE_STDLIB_H 1
#define HAVE_PWD_H 1
#define HAVE_PWD_H 1
-#define STDC_HEADERS 1
#define TIME_WITH_SYS_TIME 1
#define HAVE_GETTIMEOFDAY 1
#define TIME_WITH_SYS_TIME 1
#define HAVE_GETTIMEOFDAY 1
@@
-151,7
+152,6
@@
struct sigaction {
#undef HAVE_SETSID
#undef HAVE_FPATHCONF
#define HAVE_SELECT 1
#undef HAVE_SETSID
#undef HAVE_FPATHCONF
#define HAVE_SELECT 1
-#define HAVE_MKTIME 1
#undef HAVE_EUIDACCESS
#define HAVE_GETPAGESIZE 1
#define HAVE_TZSET 1
#undef HAVE_EUIDACCESS
#define HAVE_GETPAGESIZE 1
#define HAVE_TZSET 1
@@
-161,7
+161,6
@@
struct sigaction {
#undef HAVE_SETPGID
#undef HAVE_GETCWD
#define HAVE_SHUTDOWN 1
#undef HAVE_SETPGID
#undef HAVE_GETCWD
#define HAVE_SHUTDOWN 1
-#define HAVE_STRFTIME 1
#define LOCALTIME_CACHE
#define HAVE_INET_SOCKETS 1
#define LOCALTIME_CACHE
#define HAVE_INET_SOCKETS 1
@@
-184,12
+183,16
@@
struct sigaction {
#define HAVE_MENUS 1
#endif
#define HAVE_MENUS 1
#endif
-#define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
-
/* Get some redefinitions in place. */
#ifdef emacs
/* Get some redefinitions in place. */
#ifdef emacs
+#ifdef _MSC_VER
+#include <sys/timeb.h>
+#include <sys/stat.h>
+#include <signal.h>
+#endif
+
/* Calls that are emulated or shadowed. */
#undef access
#define access sys_access
/* Calls that are emulated or shadowed. */
#undef access
#define access sys_access
@@
-209,6
+212,7
@@
struct sigaction {
#define dup2 sys_dup2
#define fopen sys_fopen
#define link sys_link
#define dup2 sys_dup2
#define fopen sys_fopen
#define link sys_link
+#define localtime sys_localtime
#define mkdir sys_mkdir
#undef mktemp
#define mktemp sys_mktemp
#define mkdir sys_mkdir
#undef mktemp
#define mktemp sys_mktemp
@@
-278,6
+282,15
@@
typedef int pid_t;
#define utime _utime
#endif
#define utime _utime
#endif
+#ifdef _MSC_VER
+/* MSVC gets link-time errors without these redirections. */
+#define fstat(a, b) sys_fstat(a, b)
+#define stat(a, b) sys_stat(a, b)
+#if _MSC_VER >= 1400
+#define utime sys_utime
+#endif
+#endif
+
/* This is hacky, but is necessary to avoid warnings about macro
redefinitions using the SDK compilers. */
#ifndef __STDC__
/* This is hacky, but is necessary to avoid warnings about macro
redefinitions using the SDK compilers. */
#ifndef __STDC__
@@
-325,13
+338,17
@@
extern char *get_emacs_configuration_options (void);
#define _WINSOCK_H
/* Defines size_t and alloca (). */
#define _WINSOCK_H
/* Defines size_t and alloca (). */
-#if
def USE_CRT_DLL
+#if
(defined(_MSC_VER) && defined(emacs)) || defined(USE_CRT_DLL)
#define malloc e_malloc
#define free e_free
#define realloc e_realloc
#define calloc e_calloc
#endif
#define malloc e_malloc
#define free e_free
#define realloc e_realloc
#define calloc e_calloc
#endif
+#ifdef _MSC_VER
+#define alloca _alloca
+#else
#include <malloc.h>
#include <malloc.h>
+#endif
#include <sys/stat.h>
#include <sys/stat.h>
@@
-351,6
+368,8
@@
extern char *get_emacs_configuration_options (void);
#endif
#include <string.h>
#endif
#include <string.h>
+extern int getloadavg (double *, int);
+
/* We need a little extra space, see ../../lisp/loadup.el. */
#define SYSTEM_PURESIZE_EXTRA 50000
/* We need a little extra space, see ../../lisp/loadup.el. */
#define SYSTEM_PURESIZE_EXTRA 50000
@@
-388,6
+407,3
@@
extern void _DebPrint (const char *fmt, ...);
/* ============================================================ */
/* ============================================================ */
-
-/* arch-tag: 5d4a3a1c-40dc-4dea-9c7c-38fed9ae0eae
- (do not change this comment) */