1 diff -du less.orig/defines.wn less/defines.wn
2 --- less.orig/defines.wn 2011-04-10 06:59:14.000000000 +0100
3 +++ less/defines.wn 2012-03-15 08:32:53.848812020 +0000
5 /* Define MUST_DEFINE_ERRNO if you have errno but it is not define
8 +#if defined(__MINGW32__)
9 +#define MUST_DEFINE_ERRNO 0
11 #define MUST_DEFINE_ERRNO 1
14 /* Define HAVE_SYS_ERRLIST if you have the sys_errlist[] variable */
15 #define HAVE_SYS_ERRLIST 1
17 #define HAVE_UNISTD_H 0
19 /* Define if you have the <values.h> header file. */
21 +#if defined(_MSC_VER) || defined(__MINGW32__)
22 #define HAVE_VALUES_H 0
24 #define HAVE_VALUES_H 1
27 +#if !defined(__MINGW32__)
29 #define pclose _pclose
30 #define snprintf _snprintf
33 +#if defined(_MSC_VER)
34 #pragma warning(disable:4996)
36 diff -du less.orig/filename.c less/filename.c
37 --- less.orig/filename.c 2011-04-11 23:04:22.000000000 +0100
38 +++ less/filename.c 2012-03-15 08:23:13.949936491 +0000
43 -#if MSDOS_COMPILER==WIN32C && !defined(_MSC_VER)
44 +#if MSDOS_COMPILER==WIN32C && defined(__BORLANDC__)
47 #if MSDOS_COMPILER==DJGPPC
52 +#if MSDOS_COMPILER && MSDOS_COMPILER!=WIN32C
57 * Execute a shell command.
58 diff -du less.orig/lglob.h less/lglob.h
59 --- less.orig/lglob.h 2011-01-06 00:30:14.000000000 +0000
60 +++ less/lglob.h 2012-03-15 08:22:10.401621327 +0000
65 -#if MSDOS_COMPILER==WIN32C && defined(_MSC_VER)
66 +#if MSDOS_COMPILER==WIN32C && (defined(_MSC_VER) || defined(__MINGW2__))
68 #define GLOB_FIRST_NAME(filename,fndp,h) h = _findfirst(filename, fndp)
69 #define GLOB_FIRST_FAILED(handle) ((handle) == -1)
74 -#if MSDOS_COMPILER==WIN32C && !defined(_MSC_VER) /* Borland C for Windows */
75 +#if MSDOS_COMPILER==WIN32C && defined(__BORLANDC__) /* Borland C for Windows */
77 #define GLOB_FIRST_NAME(filename,fndp,h) h = findfirst(filename, fndp, ~FA_LABEL)
78 #define GLOB_FIRST_FAILED(handle) ((handle) != 0)
79 diff -du less.orig/lsystem.c less/lsystem.c
80 --- less.orig/lsystem.c 2011-04-11 23:04:22.000000000 +0100
81 +++ less/lsystem.c 2012-03-15 08:23:56.518147471 +0000
87 +#if defined(_MSC_VER) || defined(__MINGW32__)
89 #define setdisk(n) _chdrive((n)+1)
95 +#if MSDOS_COMPILER && MSDOS_COMPILER!=WIN32C
100 * This is structured much like lsystem().