Changeset 3532 for trunk/src/grep/lib
- Timestamp:
- Dec 20, 2021, 11:51:05 PM (4 years ago)
- Location:
- trunk/src/grep/lib
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/grep/lib/binary-io.h
r3529 r3532 39 39 # define __gl_setmode setmode 40 40 # else 41 # ifdef KMK_GREP 42 # include <io.h> /* declares _setmode() */ 43 # endif 41 44 # define __gl_setmode _setmode 42 45 # undef fileno -
trunk/src/grep/lib/dfa.c
r3529 r3532 297 297 RPAREN, /* RPAREN never appears in the parse tree. */ 298 298 299 #if defined(KMK_GREP) && defined(KBUILD_OS_WINDOWS) 300 # define WCHAR DFA_WCHAR 301 #endif 299 302 WCHAR, /* Only returned by lex. wctok contains 300 303 the wide character representation. */ -
trunk/src/grep/lib/dup-safer-flag.c
r3529 r3532 34 34 dup_safer_flag (int fd, int flag) 35 35 { 36 #if defined(KMK_GREP) && defined(_MSC_VER) 37 int afd[STDERR_FILENO + 1]; 38 int i; 39 for (i = 0; ; i++) 40 { 41 int fdNew = _dup(fd); 42 if (fdNew >= STDERR_FILENO + 1 || fdNew < 0) 43 { 44 while (i-- > 0) 45 close(afd[i]); 46 return fdNew; 47 } 48 afd[i] = fdNew; 49 } 50 #else 36 51 return fcntl (fd, (flag & O_CLOEXEC) ? F_DUPFD_CLOEXEC : F_DUPFD, 37 52 STDERR_FILENO + 1); 53 #endif 38 54 } -
trunk/src/grep/lib/dup-safer.c
r3529 r3532 31 31 dup_safer (int fd) 32 32 { 33 #if defined(KMK_GREP) && defined(_MSC_VER) 34 int afd[STDERR_FILENO + 1]; 35 int i; 36 for (i = 0; ; i++) 37 { 38 int fdNew = _dup(fd); 39 if (fdNew >= STDERR_FILENO + 1 || fdNew < 0) 40 { 41 while (i-- > 0) 42 close(afd[i]); 43 return fdNew; 44 } 45 afd[i] = fdNew; 46 } 47 #else 33 48 return fcntl (fd, F_DUPFD, STDERR_FILENO + 1); 49 #endif 34 50 } -
trunk/src/grep/lib/fnmatch.in.h
r3529 r3532 34 34 35 35 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ 36 #if defined(KMK_GREP) 37 # include "c++defs.h" 38 #endif 36 39 37 40 /* The definition of _GL_ARG_NONNULL is copied here. */ 41 #if defined(KMK_GREP) 42 # include "arg-nonnull.h" 43 #endif 38 44 39 45 /* The definition of _GL_WARN_ON_USE is copied here. */ -
trunk/src/grep/lib/regcomp.c
r3529 r3532 880 880 != 0); 881 881 #else 882 # ifdef _MSC_VER 883 (void)codeset_name; 884 if (GetACP() == 65001 /*utf-8*/) 885 # else 882 886 codeset_name = nl_langinfo (CODESET); 883 887 if ((codeset_name[0] == 'U' || codeset_name[0] == 'u') … … 885 889 && (codeset_name[2] == 'F' || codeset_name[2] == 'f') 886 890 && strcmp (codeset_name + 3 + (codeset_name[3] == '-'), "8") == 0) 891 # endif 887 892 dfa->is_utf8 = 1; 888 893 -
trunk/src/grep/lib/regex_internal.h
r3529 r3532 26 26 #include <string.h> 27 27 28 #if !defined(KMK_GREP) || !defined(_MSC_VER) 28 29 #include <langinfo.h> 30 #endif 29 31 #include <locale.h> 30 32 #include <wchar.h>
Note:
See TracChangeset
for help on using the changeset viewer.