diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2022-03-14 10:08:50 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2022-03-14 10:08:50 +0000 |
commit | 49b9d8ffc05bf0c271287eb1390cabad28c6a47a (patch) | |
tree | e2e1779b1d4795d6b2c3bf92a4e2e4154d82124b /Master/tlpkg/tlperl/lib/CORE/win32.h | |
parent | f03a75ebd3b935ecde4dde32687fbe86161c30ed (diff) |
New tlperl 5.34
git-svn-id: svn://tug.org/texlive/trunk@62701 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/CORE/win32.h')
-rw-r--r-- | Master/tlpkg/tlperl/lib/CORE/win32.h | 53 |
1 files changed, 40 insertions, 13 deletions
diff --git a/Master/tlpkg/tlperl/lib/CORE/win32.h b/Master/tlpkg/tlperl/lib/CORE/win32.h index c0ee5a6e92a..6d5e186204d 100644 --- a/Master/tlpkg/tlperl/lib/CORE/win32.h +++ b/Master/tlpkg/tlperl/lib/CORE/win32.h @@ -60,9 +60,6 @@ # define prime_env_iter() # define WIN32IO_IS_STDIO /* don't pull in custom stdio layer */ # define WIN32SCK_IS_STDSCK /* don't pull in custom wsock layer */ -# ifdef PERL_GLOBAL_STRUCT -# error PERL_GLOBAL_STRUCT cannot be defined with PERL_IMPLICIT_SYS -# endif #endif #ifdef __GNUC__ @@ -114,7 +111,7 @@ #if (defined(__GNUC__) && defined(__MINGW32__) && \ !defined(__MINGW64_VERSION_MAJOR) && !defined(__clang__) && \ - ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 5)))) + ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 5)))) /* use default fallbacks from perl.h for this particular GCC */ #else # if !defined(PERLDLL) && !defined(PERL_EXT_RE_BUILD) @@ -184,10 +181,10 @@ WINBASEAPI LPCH WINAPI GetEnvironmentStringsA(VOID); #endif struct tms { - long tms_utime; - long tms_stime; - long tms_cutime; - long tms_cstime; + long tms_utime; + long tms_stime; + long tms_cutime; + long tms_cstime; }; #ifndef SYS_NMLN @@ -231,8 +228,6 @@ struct utsname { # define WIN32_NO_REGISTRY_M_(x) x, #endif -#define PERL_NO_FORCE_LINK /* no need for PL_force_link_funcs */ - #define ENV_IS_CASELESS #define PIPESOCK_MODE "b" /* pipes, sockets default to binmode */ @@ -423,7 +418,9 @@ extern void *sbrk(ptrdiff_t need); #endif extern char * getlogin(void); extern int chown(const char *p, uid_t o, gid_t g); -#if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 4 +#if((!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 4) && \ + (!defined(__MINGW32_MAJOR_VERSION) || __MINGW32_MAJOR_VERSION < 3 || \ + (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION < 21))) extern int mkstemp(const char *path); #endif #endif @@ -568,7 +565,6 @@ struct interp_intern { UINT timerid; unsigned poll_count; Sighandler_t sigtable[SIG_SIZE]; - bool sloppystat; }; #define WIN32_POLL_INTERVAL 32768 @@ -602,7 +598,6 @@ struct interp_intern { #define w32_init_socktype (PL_sys_intern.thr_intern.Winit_socktype) #define w32_use_showwindow (PL_sys_intern.thr_intern.Wuse_showwindow) #define w32_showwindow (PL_sys_intern.thr_intern.Wshowwindow) -#define w32_sloppystat (PL_sys_intern.sloppystat) #ifdef USE_ITHREADS void win32_wait_for_children(pTHX); @@ -736,5 +731,37 @@ DllExport void *win32_signal_context(void); # define O_ACCMODE (O_RDWR | O_WRONLY | O_RDONLY) #endif +/* ucrt at least seems to allocate a whole bit per type, + just mask off one bit from the mask for our symlink + file type. +*/ +#define _S_IFLNK ((unsigned)(_S_IFMT ^ (_S_IFMT & -_S_IFMT))) +#undef S_ISLNK +#define S_ISLNK(mode) (((mode) & _S_IFMT) == _S_IFLNK) + +/* + +The default CRT struct stat uses unsigned short for st_dev and st_ino +which obviously isn't enough, so we define our own structure. + + */ + +typedef DWORD Dev_t; +typedef unsigned __int64 Ino_t; + +struct w32_stat { + Dev_t st_dev; + Ino_t st_ino; + unsigned short st_mode; + DWORD st_nlink; + short st_uid; + short st_gid; + Dev_t st_rdev; + Off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; +}; + #endif /* _INC_WIN32_PERL5 */ |