]> git.cworth.org Git - apitrace/blob - thirdparty/less.patch
Use skiplist-based FastCallSet within trace::CallSet
[apitrace] / thirdparty / less.patch
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
4 @@ -223,7 +223,11 @@
5  /* Define MUST_DEFINE_ERRNO if you have errno but it is not define 
6   * in errno.h */
7  #define HAVE_ERRNO 1
8 +#if defined(__MINGW32__) 
9 +#define MUST_DEFINE_ERRNO 0
10 +#else
11  #define MUST_DEFINE_ERRNO 1
12 +#endif
13  
14  /* Define HAVE_SYS_ERRLIST if you have the sys_errlist[] variable */
15  #define HAVE_SYS_ERRLIST 1
16 @@ -326,14 +330,18 @@
17  #define HAVE_UNISTD_H 0
18  
19  /* Define if you have the <values.h> header file.  */
20 -#ifdef _MSC_VER
21 +#if defined(_MSC_VER) || defined(__MINGW32__)
22  #define HAVE_VALUES_H 0
23  #else
24  #define HAVE_VALUES_H 1
25  #endif
26  
27 +#if !defined(__MINGW32__)
28  #define        popen   _popen
29  #define        pclose  _pclose
30  #define snprintf       _snprintf
31 +#endif
32  
33 +#if defined(_MSC_VER)
34  #pragma warning(disable:4996)
35 +#endif
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
39 @@ -18,7 +18,7 @@
40  #include "lglob.h"
41  #if MSDOS_COMPILER
42  #include <dos.h>
43 -#if MSDOS_COMPILER==WIN32C && !defined(_MSC_VER)
44 +#if MSDOS_COMPILER==WIN32C && defined(__BORLANDC__)
45  #include <dir.h>
46  #endif
47  #if MSDOS_COMPILER==DJGPPC
48 @@ -563,7 +563,9 @@
49  
50  #if HAVE_POPEN
51  
52 +#if MSDOS_COMPILER && MSDOS_COMPILER!=WIN32C
53  FILE *popen();
54 +#endif
55  
56  /*
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
61 @@ -57,7 +57,7 @@
62                                         char ext[_MAX_EXT];     \
63                                         int handle;
64  #else
65 -#if MSDOS_COMPILER==WIN32C && defined(_MSC_VER)
66 +#if MSDOS_COMPILER==WIN32C && (defined(_MSC_VER) || defined(__MINGW2__))
67  
68  #define        GLOB_FIRST_NAME(filename,fndp,h) h = _findfirst(filename, fndp)
69  #define        GLOB_FIRST_FAILED(handle)       ((handle) == -1)
70 @@ -73,7 +73,7 @@
71                                         long handle;
72  
73  #else
74 -#if MSDOS_COMPILER==WIN32C && !defined(_MSC_VER) /* Borland C for Windows */
75 +#if MSDOS_COMPILER==WIN32C && defined(__BORLANDC__) /* Borland C for Windows */
76  
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
82 @@ -20,7 +20,7 @@
83  
84  #if MSDOS_COMPILER
85  #include <dos.h>
86 -#ifdef _MSC_VER
87 +#if defined(_MSC_VER) || defined(__MINGW32__)
88  #include <direct.h>
89  #define setdisk(n) _chdrive((n)+1)
90  #else
91 @@ -292,7 +292,9 @@
92  {
93         register FILE *f;
94         register int c;
95 +#if MSDOS_COMPILER && MSDOS_COMPILER!=WIN32C
96         extern FILE *popen();
97 +#endif
98  
99         /*
100          * This is structured much like lsystem().