Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v3.11.5 #153

Merged
merged 145 commits into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
61a4f35
sysconfig: make _sysconfigdata.py relocatable
mingwandroid Jun 17, 2021
3dca801
build: add --with-nt-threads and make it default on mingw
Alexpux Jun 17, 2021
caf9902
Define `MS_WINDOWS` (and others) when compiling with MINGW
Alexpux Jun 17, 2021
2305aaa
configure: add `MACHDEP` and `platform` on MINGW
Alexpux Jun 17, 2021
2418cff
Add default configuration for MINGW
Alexpux Jun 17, 2021
8389614
configure: enable largefile support by default for Mingw
Alexpux Jun 17, 2021
02755c9
Add `PC/` to `CPPFLAGS` and to `SRCDIRS` on Mingw
Alexpux Jun 17, 2021
b971ecc
posixmodule.c: Define necessary headers for compiling on MINGW
Alexpux Jun 17, 2021
203d18e
Build winreg by default when compiling for MINGW
Alexpux Jun 17, 2021
901a082
pyport.h: Add support for MINGW
Alexpux Jun 17, 2021
930a5ec
configure: add options so that shared build is possible on MINGW
Alexpux Jun 17, 2021
125c9ee
Add dynamic loading support for MINGW
Alexpux Jun 17, 2021
3985966
Ignore main program for frozen scripts on MINGW
Alexpux Jun 17, 2021
43bbdbf
Add missing library for multiprocessing module
naveen521kk Feb 13, 2023
e85c2f9
selectmodule: add support for MINGW
naveen521kk Feb 13, 2023
a96e9c7
setup.py: add libraries to fix compile of ctypes on MINGW
naveen521kk Feb 13, 2023
f3aa6d1
Detect winsock2 and setup _socket module on MINGW
Alexpux Jun 17, 2021
6244599
Enable some windows specific modules
naveen521kk Feb 14, 2023
f59a672
sysconfig: MINGW build extensions with GCC
lazka Sep 21, 2021
e974a9d
sysconfig: treat MINGW builds as POSIX builds
Alexpux Jun 17, 2021
17a8ef3
Add support for stdcall without underscore
Alexpux Jun 17, 2021
dfda95f
Use replace instead rename to avoid failure on windows
Alexpux Jun 17, 2021
a086a11
Customize site for MINGW
Alexpux Jun 17, 2021
5d08426
add python config sh
Alexpux Jun 17, 2021
eb1c2b5
setup.py: add export_symbols to fix compile of ctypes
naveen521kk Apr 7, 2023
b300847
mingw: prefer unix sep if MSYSTEM environment variable
mingwandroid Jun 17, 2021
3164be7
msys cygwin semi native build sysconfig
Alexpux Jun 17, 2021
f5327a2
sysconfig: mingw sysconfig like posix
lazka Sep 21, 2021
6c0c4ac
cross dont add multiarch paths if cross compiling
Alexpux Jun 17, 2021
7a53676
mingw use backslashes in compileall py
Alexpux Jun 17, 2021
08044df
msys convert_path fix and root hack
lazka Sep 21, 2021
555d752
mingw pdcurses_ISPAD
Alexpux Jun 17, 2021
29d805b
msys monkeypatch os system via sh exe
Alexpux Jun 17, 2021
6d8376b
msys replace slashes used in io redirection
Alexpux Jun 17, 2021
f4588e9
remove_path_max.default
Alexpux Jun 17, 2021
3899109
dont link with gettext
Alexpux Jun 17, 2021
c7be96b
ctypes python dll
Alexpux Jun 17, 2021
fc0ffcc
gdbm module includes
Alexpux Jun 17, 2021
42b7985
use gnu_printf in format
Alexpux Jun 17, 2021
675f918
mingw fix ssl dont use enum_certificates
mingwandroid Jun 17, 2021
6879a9b
fix using dllhandle and winver mingw
Alexpux Jun 17, 2021
ed46794
Add AMD64 to sys config so msvccompiler get_build_version works
Alexpux Jun 17, 2021
cb95b22
MINGW link with additional library
Alexpux Jun 17, 2021
a9292ad
install msilib
saghul Jun 17, 2021
8849097
fix signal module build
lazka Jun 17, 2021
dbdcdc6
build: build winconsoleio and _testconsole
lazka Jun 17, 2021
6fbb7d5
expose sem_unlink
lazka Jun 17, 2021
6686393
cygpty isatty
lazka Jun 17, 2021
b67ad50
disable broken gdbm module
lazka Jun 17, 2021
f834541
build: link win resource files and build pythonw
lazka Jun 17, 2021
d93200e
disable readline
lazka Jun 17, 2021
39402ca
fix isselectable
lazka Jun 17, 2021
f714542
_xxsubinterpretersmodule
Alexpux Jun 17, 2021
3e21c4c
configure.ac: fix inet_pton check
lazka Jun 17, 2021
0163f82
set venv activate path unix
danyeaw Jun 17, 2021
9edf05a
pass gen profile ldflags
lazka Jun 17, 2021
b3c221a
pkg config windows must link ext with python lib
Alexpux Jun 17, 2021
31a2f00
importlib bootstrap path sep
lazka Jun 17, 2021
94f97dd
pathlib path sep
lazka Jun 17, 2021
b1b8320
warnings fixes
Alexpux Jun 17, 2021
c81d6ee
fix build testinternalcapi
naveen521kk Jun 16, 2023
ec3cd5e
extend MS_WINDOWS flag
longnguyen2004 Jun 17, 2021
5ab35cc
clang arm64
jeremyd2019 Jun 17, 2021
d25b6dd
configure.ac: set MINGW stack reserve
jeremyd2019 Jun 17, 2021
389e4cc
Don't use os.pathsep to find EOF
naveen521kk Jun 18, 2021
88f7241
Fix extension suffix for c-extensions on mingw
naveen521kk Jun 23, 2021
ea83317
Change the `get_platform()` method in sysconfig
naveen521kk Sep 21, 2021
aebe861
distutils: compiler customize mingw cygwin compilers
Alexpux Jun 17, 2021
923a3c5
distutils: compiler enable new dtags
Alexpux Jun 17, 2021
7476962
distutils: MINGW build extensions with GCC
lazka Sep 21, 2021
7060026
distutils: use Mingw32CCompiler as default compiler for m
Alexpux Jun 17, 2021
77438d9
distutils: find import library
Alexpux Jun 17, 2021
e0f7adc
distutils: avoid circular dependency from time module dur
Alexpux Jun 17, 2021
7a8eda8
distutils: generalization of posix build in distutils sys
Alexpux Jun 17, 2021
ec0bd2b
distutils: mingw sysconfig like posix
lazka Sep 21, 2021
2f7362b
distutils: get_versions() fixes
lazka Sep 21, 2021
574b385
distutils: install layout as posix
Alexpux Jun 17, 2021
53a5591
distutils: msys convert_path fix and root hack
lazka Sep 21, 2021
fd6bbfe
distutils: mingw build optimized ext
Alexpux Jun 17, 2021
4f1c118
distutils: cygwinccompiler dont strip modules if pydebug
mingwandroid Jun 17, 2021
e32105b
distutils: get compilers from env vars
longnguyen2004 Aug 17, 2021
8936254
distutils: add windmc to cygwinccompiler
Alexpux Jun 17, 2021
bbefe06
distutils: fix msvc9 import
lazka Jun 17, 2021
2701ed6
distutils: mingw add LIBPL to library dirs
Alexpux Jun 17, 2021
d66edd9
distutils: Change the `get_platform()` method in distutils to match s…
naveen521kk Sep 21, 2021
e1b2793
build: Fix ncursesw include lookup
Alexpux Jun 17, 2021
b77a578
tests: fix test_bytes
lazka Jul 23, 2021
e178448
time: fix strftime not raising for invalid year values
lazka Jul 23, 2021
bc92836
ctypes: find_library('c') should return None with ucrt
lazka Jul 23, 2021
d7f917a
build: Disable checks for dlopen/dlfcn
lazka Jul 25, 2021
4daeb4d
Fix install location of the import library
lazka Jul 25, 2021
c6ef700
Set MSYS2_ARG_CONV_EXCL for the shared Python module install
lazka Jul 25, 2021
d1d9c27
build: Integrate venvlauncher build/installation into the Makefile
lazka Jul 25, 2021
70f172b
configure.ac: set _WIN32_WINNT version
lazka Aug 1, 2021
184e0da
configure.ac: don't check for clock_ functions
lazka Aug 1, 2021
4c83626
expanduser: normpath paths coming from env vars
lazka Aug 8, 2021
c04f4f7
CI: test the build and add some mingw specific tests
naveen521kk Jun 18, 2021
1453f7b
Prefer sysconfig.python_build
longnguyen2004 Oct 1, 2021
5b37559
Define PY3_DLLNAME to fix build
naveen521kk Oct 12, 2021
8675fbb
distutils: remove checks for ancient gcc/binutils
lazka Nov 7, 2021
9299277
distutils: split CC env var before passing to subprocess
lazka Nov 7, 2021
be15db6
_testconsole.c: Fix casing & path sep
longnguyen2004 Nov 14, 2021
173b17f
Return consistent architecture markers for python on mingw/armv7
mstorsjo Nov 19, 2021
a197f1d
distutils: add back gcc_version
lazka Nov 21, 2021
3972f70
fix mingw cross compiling in setup.py
jeremyd2019 Nov 22, 2021
716cb91
handle ncursesw pkg-config when cross-compiling
jeremyd2019 Nov 23, 2021
1d99821
mingw_smoketests: fix _UCRT condition
jeremyd2019 Jan 22, 2022
e634147
Modify `sys.winver` to match upstream
naveen521kk Jan 19, 2022
afa915e
Change user site-packages path to include the environment info
naveen521kk Jan 19, 2022
bd566c9
configure: Include a header in the check for _beginthread
mstorsjo Apr 21, 2022
9a7dd38
configure.ac: Default to --without-c-locale-coercion on Windows
lazka Apr 22, 2022
c2815c4
Fix failing tests
naveen521kk Jun 5, 2022
1a17213
distutils: add build root to libdirs when building uninstalled
lazka Jun 6, 2022
6d4f179
Don't change os.sep with an empty MSYSTEM env var, not just a missing…
lazka Sep 22, 2022
aeb90ec
def VPATH when compiling `Python/sysmodule.c`
naveen521kk Jun 18, 2023
f1c2d47
Make `_Py_CheckPython3` extern
naveen521kk Jun 18, 2023
304647a
link with bcrypt
naveen521kk Jun 18, 2023
eebcc8a
correctly find native python
naveen521kk Jun 18, 2023
fcb4948
Add extra flags for `_bootstrap_python`
naveen521kk Jun 18, 2023
c729b08
posixmodule: undefine `HAVE_OPENDIR`
naveen521kk Jun 20, 2023
fb38f76
getpath.py: add support for mingw
naveen521kk Jun 20, 2023
f18b577
Don't build _posixsubprocess on Windows.
naveen521kk Jun 20, 2023
69d27f4
`_ssl`: link with `ws2_32`
naveen521kk Jun 20, 2023
e9267ce
Fix building `_socket` module
naveen521kk Jun 20, 2023
7c79e92
Always normalize path in abspath
naveen521kk Jun 20, 2023
dbdb325
Include `winsock.h` when checking for netdb function
naveen521kk Jun 21, 2023
54fb9d1
include `_multiprocessing/semaphore.c` on win32
naveen521kk Jun 23, 2023
551af83
configure: build `mmap` module on win32
naveen521kk Jun 23, 2023
2b93c58
venv creation fixes
naveen521kk Jun 23, 2023
7bfeffb
move the `shutdown` function where `winsock.h` is included
naveen521kk Jun 23, 2023
3a239a4
configure.ac: set BUILDEXEEXT and EXEEXT
lazka Jun 23, 2023
e912e47
configure.ac: fix building some test modules
lazka Jun 23, 2023
7344544
Don't convert `sysconfig.get_config_var('VPATH')` to an absolute path
naveen521kk Jun 25, 2023
c9bed99
Always convert `/` to `\\` before passing though pathcch functions
naveen521kk Jun 25, 2023
4550ea0
Build venvlauncher.exe from PC/launcher.c
naveen521kk Jun 25, 2023
9f0c334
getpath.py: fix `dirname`
naveen521kk Jun 25, 2023
1abab23
gh-105821: Use a raw f-string in test_httpservers.py (#105822)
pablogsal Jun 15, 2023
c7900e4
getpath: use normpath on all generated paths
lazka Jul 28, 2023
16d784e
pathconfig: normpath sys.path[0]
lazka Jul 28, 2023
c15ee55
smoketests: add some tests for sys/site paths
lazka Jul 28, 2023
ddb8e9f
Search DLLs only on paths added using `add_dll_directory()`.
naveen521kk Aug 5, 2023
1716f39
Allow picking up include/lib dirs from CFLAGS/LDFLAGS for Windows tar…
mstorsjo Aug 16, 2023
05b95c2
Build and install libpython3.dll
lazka Aug 21, 2023
5e5fab0
setup.py: don't prepend the system library directories when building …
lazka Aug 25, 2023
4df3c29
tests: skip a broken test
lazka Aug 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
294 changes: 294 additions & 0 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,294 @@
name: Build
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
msystem: ['MINGW64','MINGW32','UCRT64','CLANG64','CLANG32']
include:
- msystem: MINGW64
prefix: mingw-w64-x86_64
- msystem: MINGW32
prefix: mingw-w64-i686
- msystem: UCRT64
prefix: mingw-w64-ucrt-x86_64
- msystem: CLANG64
prefix: mingw-w64-clang-x86_64
- msystem: CLANG32
prefix: mingw-w64-clang-i686
steps:
- name: Setup git
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
release: false
update: true
install: >-
make
binutils
autoconf
autoconf-archive
automake-wrapper
tar
gzip
${{ matrix.prefix }}-toolchain
${{ matrix.prefix }}-expat
${{ matrix.prefix }}-bzip2
${{ matrix.prefix }}-libffi
${{ matrix.prefix }}-mpdecimal
${{ matrix.prefix }}-ncurses
${{ matrix.prefix }}-openssl
${{ matrix.prefix }}-sqlite3
${{ matrix.prefix }}-tcl
${{ matrix.prefix }}-tk
${{ matrix.prefix }}-zlib
${{ matrix.prefix }}-xz
${{ matrix.prefix }}-tzdata

- name: Build Python
shell: msys2 {0}
run: |
set -ex

if [[ "${{ matrix.msystem }}" == "CLANG64" ]] || [[ "${{ matrix.msystem }}" == "CLANG32" ]]; then
export CC=clang
export CXX=clang++
fi
autoreconf -vfi

rm -Rf _build && mkdir _build && cd _build

../configure \
--prefix=${MINGW_PREFIX} \
--host=${MINGW_CHOST} \
--build=${MINGW_CHOST} \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--with-system-libmpdec \
--without-ensurepip \
--enable-loadable-sqlite-extensions \
--with-tzpath=${MINGW_PREFIX}/share/zoneinfo \
--enable-optimizations

make -j8

- name: Run Smoke Test (build)
shell: msys2 {0}
run: |
export SETUPTOOLS_USE_DISTUTILS=stdlib
SMOKETESTS="$(pwd)/mingw_smoketests.py"
cd _build
./python.exe "$SMOKETESTS"
MSYSTEM= ./python.exe "$SMOKETESTS"

- name: Run tests
shell: msys2 {0}
run: |
export SETUPTOOLS_USE_DISTUTILS=stdlib
IGNOREFILE="$(pwd)/mingw_ignorefile.txt"
cd _build
MSYSTEM= ./python.exe -m test -j8 --ignorefile "$IGNOREFILE" -W

- name: Run broken tests
continue-on-error: true
shell: msys2 {0}
run: |
export SETUPTOOLS_USE_DISTUTILS=stdlib
IGNOREFILE="$(pwd)/mingw_ignorefile.txt"
cd _build
MSYSTEM= ./python.exe -m test -j8 --matchfile "$IGNOREFILE" -W

- name: Install
shell: msys2 {0}
run: |
set -ex
cd _build

pkgdir=python_pkgdir

make -j1 install DESTDIR="${pkgdir}"

# Fix shebangs
_pybasever=$(./python.exe -c "import sys; print(f'{sys.version_info[0]}.{sys.version_info[1]}');")
for fscripts in 2to3 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever}; do
sed -i "s|$(cygpath -w ${MINGW_PREFIX} | sed 's|\\|\\\\|g')/bin/python${_pybasever}.exe|/usr/bin/env python${_pybasever}.exe|g" "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts}
done
sed -i "s|#!${MINGW_PREFIX}/bin/python${_pybasever}.exe|#!/usr/bin/env python${_pybasever}.exe|" "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${_pybasever}/python-config.py

# Create version-less aliases
cp "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe "${pkgdir}${MINGW_PREFIX}"/bin/python.exe
cp "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe "${pkgdir}${MINGW_PREFIX}"/bin/pythonw.exe
cp "${pkgdir}${MINGW_PREFIX}"/bin/python3-config "${pkgdir}${MINGW_PREFIX}"/bin/python-config
cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle
cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc

# copy to /
cp -rf "${pkgdir}"/* /

- name: Run Smoke Test (installed)
shell: msys2 {0}
run: |
export SETUPTOOLS_USE_DISTUTILS=stdlib
SMOKETESTS="$(pwd)/mingw_smoketests.py"
${MINGW_PREFIX}/bin/python.exe "$SMOKETESTS"
MSYSTEM= ${MINGW_PREFIX}/bin/python.exe "$SMOKETESTS"

- name: Compress
if: always()
shell: msys2 {0}
run: |
cd _build
tar -zcf python.tar.gz python_pkgdir/

- name: Upload
uses: actions/upload-artifact@v3
if: always()
with:
name: build-${{ matrix.msystem }}
path: _build/python.tar.gz

cross-gcc-x86_64:
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
steps:
- uses: actions/checkout@v3
- name: Install deps
run: |
pacman --noconfirm -Suuy
pacman --needed --noconfirm -S mingw-w64-gcc autoconf-archive autoconf automake zip

- uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Check Python Version
run: |
which python
python --version

- name: Build
run: |
autoreconf -vfi

mkdir _build && cd _build

../configure \
--host=x86_64-w64-mingw32 \
--build=x86_64-pc-linux-gnu \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--with-system-libmpdec \
--without-ensurepip \
--enable-loadable-sqlite-extensions \
--with-build-python=python3.11

make -j8

make install DESTDIR="$(pwd)/install"

- name: 'Zip files'
run: |
zip -r install.zip _build/install

- name: Upload
uses: actions/upload-artifact@v3
with:
name: build-cross-gcc-x86_64
path: install.zip

cross-gcc-x86_64-test:
needs: [cross-gcc-x86_64]
runs-on: windows-latest
steps:
- uses: actions/download-artifact@v3
with:
name: build-cross-gcc-x86_64

- name: 'Run tests'
run: |
7z x install.zip
./_build/install/usr/local/bin/python3.exe -c "import sysconfig, pprint; pprint.pprint(sysconfig.get_config_vars())"


cross-llvm-mingw:
runs-on: ubuntu-latest
container:
image: mstorsjo/llvm-mingw:latest
strategy:
fail-fast: false
matrix:
arch: ['x86_64', 'i686', 'aarch64', 'armv7']
steps:
- uses: actions/checkout@v3

- name: Install deps
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get install -qqy software-properties-common
add-apt-repository --yes ppa:deadsnakes/ppa
apt-get update -qq
apt-get install -qqy autoconf-archive python3.11-dev python3.11

- name: Build
run: |
autoreconf -vfi

mkdir _build && cd _build

export CC=${{ matrix.arch }}-w64-mingw32-clang
export CXX=${CC}++
../configure \
--host=${{ matrix.arch }}-w64-mingw32 \
--build=x86_64-pc-linux-gnu \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--with-system-libmpdec \
--without-ensurepip \
--without-c-locale-coercion \
--enable-loadable-sqlite-extensions \
--with-build-python=python3.11

make -j8

make install DESTDIR="$(pwd)/install"

- name: 'Zip files'
run: |
zip -r install.zip _build/install

- name: Upload
uses: actions/upload-artifact@v3
with:
name: build-cross-llvm-mingw-${{ matrix.arch }}
path: install.zip

cross-llvm-mingw-test:
needs: [cross-llvm-mingw]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch: ['x86_64', 'i686']
steps:
- uses: actions/download-artifact@v3
with:
name: build-cross-llvm-mingw-${{ matrix.arch }}

- name: 'Run tests'
run: |
7z x install.zip
./_build/install/usr/local/bin/python3.exe -c "import sysconfig, pprint; pprint.pprint(sysconfig.get_config_vars())"


4 changes: 2 additions & 2 deletions Include/bytesobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
PyAPI_FUNC(PyObject *) PyBytes_FromString(const char *);
PyAPI_FUNC(PyObject *) PyBytes_FromObject(PyObject *);
PyAPI_FUNC(PyObject *) PyBytes_FromFormatV(const char*, va_list)
Py_GCC_ATTRIBUTE((format(printf, 1, 0)));
Py_PRINTF(1, 0);
PyAPI_FUNC(PyObject *) PyBytes_FromFormat(const char*, ...)
Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
Py_PRINTF(1, 2);
PyAPI_FUNC(Py_ssize_t) PyBytes_Size(PyObject *);
PyAPI_FUNC(char *) PyBytes_AsString(PyObject *);
PyAPI_FUNC(PyObject *) PyBytes_Repr(PyObject *, int);
Expand Down
2 changes: 1 addition & 1 deletion Include/fileobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ PyAPI_DATA(int) Py_UTF8Mode;
#endif

/* A routine to check if a file descriptor can be select()-ed. */
#ifdef _MSC_VER
#ifdef MS_WINDOWS
/* On Windows, any socket fd can be select()-ed, no matter how high */
#define _PyIsSelectable_fd(FD) (1)
#else
Expand Down
10 changes: 10 additions & 0 deletions Include/internal/pycore_condvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# error "this header requires Py_BUILD_CORE define"
#endif

#ifdef __MINGW32__
# if !defined(HAVE_PTHREAD_H) || defined(NT_THREADS)
# undef _POSIX_THREADS
# endif
#endif

#ifndef _POSIX_THREADS
/* This means pthreads are not implemented in libc headers, hence the macro
not present in unistd.h. But they still can be implemented as an external
Expand Down Expand Up @@ -39,6 +45,10 @@
/* include windows if it hasn't been done before */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
/* winpthreads are involved via windows header, so need undef _POSIX_THREADS after header include */
#if defined(_POSIX_THREADS)
#undef _POSIX_THREADS
#endif

/* options */
/* non-emulated condition variables are provided for those that want
Expand Down
41 changes: 41 additions & 0 deletions Include/iscygpty.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* iscygpty.h -- part of ptycheck
* https://github.com/k-takata/ptycheck
*
* Copyright (c) 2015-2017 K.Takata
*
* You can redistribute it and/or modify it under the terms of either
* the MIT license (as described below) or the Vim license.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#ifndef _ISCYGPTY_H
#define _ISCYGPTY_H

#ifdef _WIN32
int is_cygpty(int fd);
int is_cygpty_used(void);
#else
#define is_cygpty(fd) 0
#define is_cygpty_used() 0
#endif

#endif /* _ISCYGPTY_H */
1 change: 0 additions & 1 deletion Include/osdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ extern "C" {
#ifdef MS_WINDOWS
#define SEP L'\\'
#define ALTSEP L'/'
#define MAXPATHLEN 256
#define DELIM L';'
#endif

Expand Down
Loading
Loading