提交 99753ae0 编写于 作者: H Hui Li

Merge branch 'develop' into hotfix/test

......@@ -121,6 +121,7 @@ IF (TD_WINDOWS)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/iconv)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/regex)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/wepoll/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/MsvcLibX/include)
ENDIF ()
IF (TD_WINDOWS_64)
......
......@@ -27,7 +27,7 @@ ELSEIF (TD_WINDOWS_64)
#INSTALL(TARGETS taos RUNTIME DESTINATION driver)
#INSTALL(TARGETS shell RUNTIME DESTINATION .)
IF (TD_MVN_INSTALLED)
INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos-jdbcdriver-1.0.2-dist.jar DESTINATION connector/jdbc)
INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos-jdbcdriver-2.0.0-dist.jar DESTINATION connector/jdbc)
ENDIF ()
ELSE ()
INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/libtaos.dll DESTINATION driver)
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine)
IF (TD_WINDOWS_64)
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(FindWindowsSDK)
get_mywindowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIR)
get_ucrt_include_dirs(${WINDOWSSDK_PREFERRED_DIR} UCRT_INCLUDE_DIR)
Add_Definitions("-DWSDKINCLUDE=${WINSDK_INCLUDE_DIR}")
include(FindMSVC)
Add_Definitions("-DMSVCINCLUDE=${VC_INCLUDE_DIR}")
IF ((NOT DEFINED UCRT_INCLUDE_DIR) OR (UCRT_INCLUDE_DIR STREQUAL "NOTFOUND"))
Message(STATUS "UCRT_INCLUDE_DIR notu found, set it to vc incude dir")
SET(UCRT_INCLUDE_DIR "${VC_INCLUDE_DIR}")
Add_Definitions("-DUCRTINCLUDE=${VC_INCLUDE_DIR}")
ELSE ()
Add_Definitions("-DUCRTINCLUDE=${UCRT_INCLUDE_DIR}")
ENDIF ()
Message(STATUS "WINSDK_INCLUDE_DIR: ${WINSDK_INCLUDE_DIR}")
Message(STATUS "UCRT_INCLUDE_DIR: ${UCRT_INCLUDE_DIR}")
Message(STATUS "VC_INCLUDE_DIR: ${VC_INCLUDE_DIR}")
IF (TD_WINDOWS)
INCLUDE_DIRECTORIES(include)
AUX_SOURCE_DIRECTORY(src SRC)
ADD_LIBRARY(MsvcLibXw64 ${SRC})
......
此差异已折叠。
:# config.DESKTOP-U79TD6T.bat generated by configure.bat on 2020/05/19 ܶ 7:49:05.47
:#
:# If changes are needeed, do not edit this file, but instead create a new script
:# called configure.YOURCHOICE.bat. This new script will be invoked automatically
:# by configure.bat while creating this file. Then your script can write extra
:# definitions, or change some of the variables before configure.bat writes them.
:#
:# Invoke configure.bat manually if anything changes in the tools config, such as
:# installing a Visual Studio update, or updating a configure.XXX.bat script.
set "HAS_STINCLUDE=1" &:# Found the System Tools global C includes
set "STINCLUDE=C:\Users\admin\Desktop\temp\MyGitHub\C\include" &:# System Tools global C includes
set "HAS_SDK_FLAGS=/DHAS_STINCLUDE=1" &:# SDK detection flags for the C compiler
SET "PF32=C:\Program Files (x86)" &:# 32-bits Program Files
SET "PF64=C:\Program Files" &:# 64-bits Program Files
SET "ARCH=AMD64" &:# PROCESSOR_ARCHITECTURE
SET "MASM=" &:# Microsoft 16-bits Assembler base path
SET "MSVC=" &:# Microsoft 16-bits Visual C++ base path
SET "MAPSYM=" &:# 16-bits debugging symbols generator
SET "VSTUDIOLONG=C:\Program Files (x86)\Microsoft Visual Studio 14.0" &:# Microsoft Visual Studio (Long path)
SET "VSTUDIO=C:\PROGRA~2\MICROS~2.0" &:# Microsoft Visual Studio (Short path)
SET "VSCOMMONLONG=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7" &:# Microsoft Visual Studio Common Files (Long path)
SET "VSCOMMON=C:\PROGRA~2\MICROS~2.0\Common7" &:# Microsoft Visual Studio Common Files (Short path)
SET "VSIDELONG=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE" &:# Microsoft Visual Studio IDE Files (Long path)
SET "VSIDE=C:\PROGRA~2\MICROS~2.0\Common7\IDE" &:# Microsoft Visual Studio IDE Files (Short path)
SET "VSTOOLSLONG=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools" &:# Microsoft Visual Studio Tools (Long paths)
SET "VSTOOLS=C:\PROGRA~2\MICROS~2.0\Common7\Tools" &:# Microsoft Visual Studio Tools (Short paths)
SET "MSVC32LONG=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC" &:# Microsoft Visual C++ 32/64 bits (Long path)
SET "MSVC32=C:\PROGRA~2\MICROS~2.0\VC" &:# Microsoft Visual C++ 32/64 bits (Short path)
SET "WIN_CP=936" &:# Windows Code Page
SET "WIN_CS=gb2312" &:# Windows Character Set
SET "DOS_CP=936" &:# DOS Code Page
SET "DOS_CS=gb2312" &:# DOS Character Set
SET "AS=" &:# Assembler
SET "CC=" &:# C compiler
SET "INCLUDE=C:\Users\admin\Desktop\temp\MyGitHub\C\include" &:# Include paths. Define USER_INCLUDE if needed.
SET "LK=" &:# Linker
SET "LIB=" &:# Libraries paths. Define USER_LIBS if needed.
SET "LB=" &:# Library manager
SET "RC=" &:# Resource compiler
SET "MT=" &:# Manifest tool
SET "DOS_CC=" &:# Microsoft Visual C++ 16-bits compiler
SET "DOS_AS=" &:# Microsoft 16-bits assembler
SET "DOS_LK=" &:# Microsoft 16-bits linker
SET "DOS_LB=" &:# Microsoft 16-bits librarian
SET "DOS_RC=" &:# Microsoft 16-bits resource compiler
SET "DOS_MT=" &:# Microsoft 16-bits manifest tool
SET "DOS_PATH=;C:\Windows\System32;C:\Windows" &:# All tools paths for 16-bits compilation
SET "DOS_VCINC=" &:# Visual C++ 16-bits compiler include dir for MsvcLibX include_next
SET "DOS_CRTINC=" &:# Visual C++ 16-bits CRT library include dir for MsvcLibX include_next
SET "DOS_INCPATH=" &:# Include paths for 16-bits compilation
SET "DOS_LIBPATH=" &:# Libraries paths for 16-bits linking
SET "DOS_WINSDK=" &:# Microsoft Windows 16-bits SDK
SET "DOS_WINSDKINC=" &:# Microsoft Windows 16-bits SDK Include directory
SET "WIN95_CC=" &:# Microsoft Visual C++ 32-bits compiler
SET "WIN95_AS=" &:# Microsoft 32-bits assembler
SET "WIN95_LK=" &:# Microsoft 32-bits linker
SET "WIN95_LB=" &:# Microsoft 32-bits librarian
SET "WIN95_RC=" &:# Microsoft 32-bits resource compiler
SET "WIN95_MT=" &:# Microsoft 32-bits manifest tool
SET "WIN95_PATH=;C:\Windows\System32;C:\Windows" &:# All tools paths for 32-bits compilation
SET "WIN95_VCINC=" &:# Visual C++ 32-bits compiler include dir for MsvcLibX include_next
SET "WIN95_CRTINC=" &:# Visual C++ 32-bits CRT library include dir for MsvcLibX include_next
SET "WIN95_INCPATH=" &:# Include paths for 32-bits compilation
SET "WIN95_LIBPATH=" &:# Libraries paths for 32-bits linking
SET "WIN95_WINSDK=" &:# Microsoft Windows 32-bits SDK
SET "WIN95_WINSDKINC=" &:# Microsoft Windows 32-bits SDK Include directory
SET "WIN32_CC="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.EXE"" &:# Microsoft Visual C++ 32-bits compiler
SET "WIN32_AS="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\ML.EXE"" &:# Microsoft 32-bits assembler
SET "WIN32_LK="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\LINK.EXE"" &:# Microsoft 32-bits linker
SET "WIN32_LB="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\LIB.EXE"" &:# Microsoft 32-bits librarian
SET "WIN32_RC=" &:# Microsoft 32-bits resource compiler
SET "WIN32_MT=" &:# Microsoft 32-bits manifest tool
SET "WIN32_PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Windows\System32;C:\Windows" &:# All tools paths for 32-bits compilation
SET "WIN32_VCINC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" &:# Visual C++ 32-bits compiler include dir for MsvcLibX include_next
SET "WIN32_CRTINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" &:# Visual C++ 32-bits CRT library include dir for MsvcLibX include_next
SET "WIN32_INCPATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include;:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt" &:# Include paths for 32-bits compilation
SET "WIN32_LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86" &:# Libraries paths for 32-bits linking
SET "WIN32_WINSDK=C:\Program Files (x86)\Windows Kits\10" &:# Microsoft Windows 32-bits SDK
SET "WIN32_WINSDKINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0" &:# Microsoft Windows 32-bits SDK Include directory
SET "IA64_CC=" &:# Microsoft Visual C++ IA64 compiler
SET "IA64_AS=" &:# Microsoft IA64 assembler
SET "IA64_LK=" &:# Microsoft IA64 linker
SET "IA64_LB=" &:# Microsoft IA64 librarian
SET "IA64_RC=" &:# Microsoft IA64 resource compiler
SET "IA64_MT=" &:# Microsoft IA64 manifest tool
SET "IA64_PATH=;C:\Windows\System32;C:\Windows" &:# All tools paths for IA64 compilation
SET "IA64_VCINC=" &:# Visual C++ IA64 compiler include dir for MsvcLibX include_next
SET "IA64_CRTINC=" &:# Visual C++ IA64 CRT library include dir for MsvcLibX include_next
SET "IA64_INCPATH=" &:# Include paths for IA64 compilation
SET "IA64_LIBPATH=" &:# Libraries paths for IA64 linking
SET "IA64_WINSDK=" &:# Microsoft Windows IA64 SDK
SET "IA64_WINSDKINC=" &:# Microsoft Windows IA64 SDK Include directory
SET "WIN64_CC="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\CL.EXE"" &:# Microsoft Visual C++ 64-bits compiler
SET "WIN64_AS="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\ML64.EXE"" &:# Microsoft 64-bits assembler
SET "WIN64_LK="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\LINK.EXE"" &:# Microsoft 64-bits linker
SET "WIN64_LB="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\LIB.EXE"" &:# Microsoft 64-bits librarian
SET "WIN64_RC=" &:# Microsoft 64-bits resource compiler
SET "WIN64_MT=" &:# Microsoft 64-bits manifest tool
SET "WIN64_PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Windows\System32;C:\Windows" &:# All tools paths for 64-bits compilation
SET "WIN64_VCINC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" &:# Visual C++ 64-bits compiler include dir for MsvcLibX include_next
SET "WIN64_CRTINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" &:# Visual C++ 64-bits CRT library include dir for MsvcLibX include_next
SET "WIN64_INCPATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include;:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt" &:# Include paths for 64-bits compilation
SET "WIN64_LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\amd64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64" &:# Libraries paths for 64-bits linking
SET "WIN64_WINSDK=C:\Program Files (x86)\Windows Kits\10" &:# Microsoft Windows 64-bits SDK
SET "WIN64_WINSDKINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0" &:# Microsoft Windows 64-bits SDK Include directory
SET "ARM_CC="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_arm\CL.EXE"" &:# Microsoft Visual C++ ARM compiler
SET "ARM_AS="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_arm\ARMASM.EXE"" &:# Microsoft ARM assembler
SET "ARM_LK="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_arm\LINK.EXE"" &:# Microsoft ARM linker
SET "ARM_LB="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_arm\LIB.EXE"" &:# Microsoft ARM librarian
SET "ARM_RC=" &:# Microsoft ARM resource compiler
SET "ARM_MT=" &:# Microsoft ARM manifest tool
SET "ARM_PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_arm;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Windows\System32;C:\Windows" &:# All tools paths for ARM compilation
SET "ARM_VCINC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" &:# Visual C++ ARM compiler include dir for MsvcLibX include_next
SET "ARM_CRTINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" &:# Visual C++ ARM CRT library include dir for MsvcLibX include_next
SET "ARM_INCPATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include;:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt" &:# Include paths for ARM compilation
SET "ARM_LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm" &:# Libraries paths for ARM linking
SET "ARM_WINSDK=C:\Program Files (x86)\Windows Kits\10" &:# Microsoft Windows ARM SDK
SET "ARM_WINSDKINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0" &:# Microsoft Windows ARM SDK Include directory
SET "ARM64_CC=" &:# Microsoft Visual C++ ARM64 compiler
SET "ARM64_AS=" &:# Microsoft ARM64 assembler
SET "ARM64_LK=" &:# Microsoft ARM64 linker
SET "ARM64_LB=" &:# Microsoft ARM64 librarian
SET "ARM64_RC=" &:# Microsoft ARM64 resource compiler
SET "ARM64_MT=" &:# Microsoft ARM64 manifest tool
SET "ARM64_PATH=;C:\Windows\System32;C:\Windows" &:# All tools paths for ARM64 compilation
SET "ARM64_VCINC=" &:# Visual C++ ARM64 compiler include dir for MsvcLibX include_next
SET "ARM64_CRTINC=" &:# Visual C++ ARM64 CRT library include dir for MsvcLibX include_next
SET "ARM64_INCPATH=" &:# Include paths for ARM64 compilation
SET "ARM64_LIBPATH=" &:# Libraries paths for ARM64 linking
SET "ARM64_WINSDK=" &:# Microsoft Windows ARM64 SDK
SET "ARM64_WINSDKINC=" &:# Microsoft Windows ARM64 SDK Include directory
exit /b 0 &:# Configuration done successfully
@echo off
:#*****************************************************************************
:# *
:# Filename: configure.bat *
:# *
:# Description: Detect system-specific settings and create config.*.bat *
:# *
:# Notes: Proxy script for %STINCLUDE%\configure.bat. *
:# *
:# Make any change needed in %STINCLUDE%\configure.bat. *
:# *
:# History: *
:# 2016-10-10 JFL jf.larvoire@hpe.com created this file. *
:# 2016-12-15 JFL Search for the real make.bat in [.|..|../..]\include. *
:# *
:# Copyright 2016 Hewlett Packard Enterprise Development LP *
:# Licensed under the Apache 2.0 license www.apache.org/licenses/LICENSE-2.0 *
:#*****************************************************************************
:# Get the full pathname of the STINCLUDE library directory
if defined STINCLUDE if not exist "%STINCLUDE%\make.bat" set "STINCLUDE=" &:# Allow overriding with another alias name, but ignore invalid overrides
for %%p in (. .. ..\..) do if not defined STINCLUDE if exist %%p\include\make.bat ( :# Default: Search it the current directory, and 2 levels above.
for /f "delims=" %%d in ('"pushd %%p\include & cd & popd"') do SET "STINCLUDE=%%d"
)
if not defined STINCLUDE ( :# Try getting the copy in the master environment
for /f "tokens=3" %%v in ('reg query "HKCU\Environment" /v STINCLUDE 2^>NUL') do set "STINCLUDE=%%v"
)
if not exist %STINCLUDE%\make.bat (
>&2 echo %0 Error: Cannot find SysToolsLib's global C include directory. Please define variable STINCLUDE.
exit /b 1
)
if [%1]==[-d] echo "%STINCLUDE%\configure.bat" %*
"%STINCLUDE%\configure.bat" %*
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: debugm.h *
* *
......@@ -44,7 +44,7 @@
* 2016-10-04 JFL Added macros DEBUG_OFF(), DEBUG_MORE(), DEBUG_LESS(). *
* Allow using DEBUG_ON()/MORE()/LESS()/OFF() in release mode.
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: direct.h *
* *
......@@ -10,7 +10,7 @@
* 2014-03-24 JFL Created this file, with content moved from unistd.h. *
* 2015-11-15 JFL Visual Studio 2015 moved this file to the Windows Kit UCRT.
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -19,7 +19,7 @@
#include "msvclibx.h"
#include UCRT_INCLUDE_FILE(direct.h) /* Include MSVC's own <direct.h> file */
#include <direct.h> /* Include MSVC's own <direct.h> file */
#undef mkdir /* This MSVC macro is incompatible with mkdir() function in unistd.h */
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: dirent.h *
* *
......@@ -24,7 +24,7 @@
* 2015-12-07 JFL Added the conditional definition of symlink constants, so *
* that our code builds even in XP and older Windows SDKs. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: error.h *
* *
......@@ -11,7 +11,7 @@
* History: *
* 2012-10-21 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: fadvise.h *
* *
......@@ -10,7 +10,7 @@
* History: *
* 2012-10-17 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: fcntl.h *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2017-02-16 JFL Created this file. *
* *
* Copyright 2017 Hewlett Packard Enterprise Development LP *
* Copyright 2017 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -18,7 +18,7 @@
#include "msvclibx.h"
#include UCRT_INCLUDE_FILE(fcntl.h) /* Include MSVC's own <fcntl.h> file */
#include <fcntl.h> /* Include MSVC's own <fcntl.h> file */
/* Microsoft defines _open() in io.h */
#include <io.h>
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: fnmatch.h *
* *
......@@ -10,7 +10,7 @@
* History: *
* 2012-01-17 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*-
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename iconv.h *
* *
......@@ -10,7 +10,7 @@
* History: *
* 2014-02-27 JFL Created this file. *
* *
* © Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename inttypes.h *
* *
......@@ -10,7 +10,7 @@
* 2014-02-07 JFL Added definitions for PRIdMAX and PRIiMAX. *
* 2016-01-07 JFL Restructured and improved support for MS-DOS. *
* *
* © Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: libgen.h *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2016-09-08 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: limits.h *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-06-30 JFL Created this file. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -18,7 +18,7 @@
#include "msvclibx.h"
#include MSVC_INCLUDE_FILE(limits.h) /* Include MSVC's own <limits.h> file */
#include <limits.h> /* Include MSVC's own <limits.h> file */
/************************ MS-DOS-specific definitions ************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: netdb.h *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2012-01-24 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: process.h *
* *
......@@ -10,7 +10,7 @@
* 2014-03-27 JFL Created this file. *
* 2015-11-15 JFL Visual Studio 2015 moved this file to the Windows Kit UCRT.
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -19,7 +19,7 @@
#include "msvclibx.h"
#include UCRT_INCLUDE_FILE(process.h) /* Include MSVC's own <process.h> file */
#include <process.h> /* Include MSVC's own <process.h> file */
#if defined(_WIN32)
extern intptr_t _spawnvpU(int iMode, const char *pszCommand, char *const *argv);
......
#ifndef _HSREGEX_H_
#ifndef _HSREGEX_H_
#define _HSREGEX_H_
#ifndef _HSREGEX_H
#define _HSREGEX_H /* never again */
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: reparsept.h *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-02-28 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: stdbool.h *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2012-10-17 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename stdint.h *
* *
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: stdio.h *
* *
......@@ -11,7 +11,7 @@
* 2015-11-15 JFL Visual Studio 2015 moved this file to the Windows Kit UCRT.
* 2015-12-09 JFL Alias fputs to fputsU, and vfprintf to vfprintfU. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -20,7 +20,7 @@
#include "msvclibx.h"
#include UCRT_INCLUDE_FILE(stdio.h) /* Include MSVC's own <stdio.h> file */
#include <stdio.h> /* Include MSVC's own <stdio.h> file */
#include <sys/types.h>
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: stdlib.h *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2016-09-13 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -18,7 +18,7 @@
#include "msvclibx.h"
#include UCRT_INCLUDE_FILE(stdlib.h) /* Include MSVC's own <stdlib.h> file */
#include <stdlib.h> /* Include MSVC's own <stdlib.h> file */
#ifdef __cplusplus
extern "C" {
......
/* CoreUtils global system configuration definitions */
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: time.h *
* *
......@@ -10,7 +10,7 @@
* 2014-06-04 JFL Created this file. *
* 2015-11-15 JFL Visual Studio 2015 moved this file to the Windows Kit UCRT.
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -19,8 +19,8 @@
#include "msvclibx.h"
#include WINSDK_INCLUDE_FILE(winsock2.h)
#include UCRT_INCLUDE_FILE(time.h) /* Include MSVC's own <time.h> file */
#include <winsock2.h>
#include <time.h> /* Include MSVC's own <time.h> file */
#ifdef _MSDOS
......@@ -33,7 +33,7 @@
#ifdef _WIN32
#include "sys\time.h" /* for struct timespec */
#include "sys\msvcTime.h" /* for struct timespec */
typedef int clockid_t;
/* Supported values for clockid_t */
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: unistd.h *
* *
......@@ -18,7 +18,7 @@
* 2014-06-30 JFL Moved PATH_MAX definition to limits.h. *
* 2016-08-25 JFL Implemented ResolveLinksA(). *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -30,8 +30,8 @@
#endif
#include "msvclibx.h" /* Generate a library search record to load MsvcLibX.lib. */
#include "sys/types.h" /* Define pid_t and getppid(). */
#include "dirent.h" /* Define pid_t and getppid(). */
#include "sys/msvcTypes.h" /* Define pid_t and getppid(). */
#include "msvcDirent.h" /* Define pid_t and getppid(). */
#include <direct.h> /* For functions like _chdir() and _getcwd() */
#include <process.h> /* For _getpid() */
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: utime.h *
* *
......@@ -11,7 +11,7 @@
* History: *
* 2014-12-13 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: windows.h *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2016-09-12 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -20,7 +20,7 @@
#ifdef _WIN32
#include WINSDK_INCLUDE_FILE(windows.h) /* Include Windows SDK's own windows.h */
#include <windows.h> /* Include Windows SDK's own windows.h */
/****************** Define UTF-8 versions of WIN32 routines ******************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: error.h *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-02-10 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename MsvcLibX.h *
* *
......@@ -15,7 +15,7 @@
* 2016-09-28 JFL Can also be included by MS' Resource Compiler. *
* 2017-02-05 JFL Changed the UTF-8 programs initialization method. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -58,7 +58,7 @@
/* Generate the OS-and-debug-mode-specific library name */
#define _MSVCLIBX_LIB "MsvcLibX" _MSVCLIBX_LIB_OS_SUFFIX _MSVCLIBX_LIB_DBG_SUFFIX ".lib"
#pragma message("Adding pragma comment(lib, \"" _MSVCLIBX_LIB "\")")
//#pragma message("Adding pragma comment(lib, \"" _MSVCLIBX_LIB "\")")
#pragma comment(lib, _MSVCLIBX_LIB)
/* Library-specific routine used internally by many standard routines */
......
/*****************************************************************************\
* *
* Filename: stdio--.h *
* *
* Description: front-end to stdio.h that redefines some unsafe functions *
* *
* Notes: This header is part of the GNU CoreUtils library. *
* msvclibx: Pass through to the standard stdio.h. *
* *
* History: *
* 2012-10-17 JFL Created this file. *
* *
* © Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#include <stdio.h>
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename sys/param.h *
* *
......@@ -9,7 +9,7 @@
* History *
* 2014-06-10 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: stat.h *
* *
......@@ -19,7 +19,7 @@
* 2015-11-15 JFL Visual Studio 2015 moved this file to the Windows Kit UCRT.
* 2016-09-15 JFL Fixed a warning in Visual Studio 2015. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -28,11 +28,11 @@
#include "msvclibx.h"
#include <sys/types.h>
#include UCRT_INCLUDE_FILE(sys\stat.h) /* Include MSVC's own <sys/stat.h> file */
#include <dirent.h> /* For dirent2stat() arguments definitions */
#include <time.h> /* for time_t definition */
#include <sys/time.h> /* for timespec definition */
#include "sys/msvcTypes.h"
#include <sys/stat.h> /* Include MSVC's own <sys/stat.h> file */
#include "msvcDirent.h" /* For dirent2stat() arguments definitions */
#include "msvcTime.h" /* for time_t definition */
#include "sys/msvcTime.h" /* for timespec definition */
/* Include MsvcLibX's <direct.h> override, to avoid conflict with the standard mkdir defined here,
should <direct.h> be manually included later on in the C source */
#include <direct.h>
......@@ -154,7 +154,7 @@ extern char *Filetime2String(uint16_t date, uint16_t time, char *pBuf, size_t nB
if we were to use MsvcLibX extended stat structures and routines */
#define _LIBX_stat _CONCAT(_MSVC_stat,_ns)
#define _LIBX_stat64 _CONCAT(_MSVC_stat64,_ns)
#include "debugm.h"
#include "msvcDebugm.h"
#pragma message("Defining type struct " VALUEIZE(_LIBX_stat))
struct _LIBX_stat {
/* MSVC standard stat structure fields */
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename sys/time.h *
* *
......@@ -21,7 +21,7 @@
* Added macros TIMEVAL_TO_TIMESPEC & TIMESPEC_TO_TIMEVAL. *
* 2016-07-06 JFL Avoid error if winsocks2.h has been previously included. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: sys/utsname.h *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-05-30 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: sys/types.h *
* *
......@@ -11,7 +11,7 @@
* 2014-06-06 JFL Moved mode_t & off*_t definitions here, from sys\stat.h. *
* 2015-11-15 JFL Visual Studio 2015 moved this file to the Windows Kit UCRT.
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -20,7 +20,7 @@
#include "msvclibx.h"
#include UCRT_INCLUDE_FILE(sys\types.h) /* Include MSVC's own <sys/types.h> file */
#include <sys\types.h> /* Include MSVC's own <sys/types.h> file */
/************************ MS-DOS-specific definitions ************************/
......@@ -90,6 +90,7 @@ typedef int uid_t;
/* MsvcLibX uses mode_t in sys/stat.h */
typedef int mode_t;
#define HAVE_MODE_T
/* File link counts type (not used by MsvcLibX so far) */
typedef int nlink_t; /* Is short in some Unix versions */
......
/* CoreUtils global system configuration definitions */
@echo off
:#*****************************************************************************
:# *
:# Filename: make.bat *
:# *
:# Description: Build DOS and Windows targets *
:# *
:# Notes: Proxy script for %STINCLUDE%\make.bat. *
:# *
:# If any change is needed, put it in %STINCLUDE%\make.bat. *
:# *
:# History: *
:# 2016-10-10 JFL jf.larvoire@hpe.com created this file. *
:# 2016-12-15 JFL Search for the real make.bat in [.|..|../..]\include. *
:# *
:# Copyright 2016 Hewlett Packard Enterprise Development LP *
:# Licensed under the Apache 2.0 license www.apache.org/licenses/LICENSE-2.0 *
:#*****************************************************************************
:# Get the full pathname of the STINCLUDE library directory
if defined STINCLUDE if not exist "%STINCLUDE%\make.bat" set "STINCLUDE=" &:# Allow overriding with another alias name, but ignore invalid overrides
for %%p in (. .. ..\..) do if not defined STINCLUDE if exist %%p\include\make.bat ( :# Default: Search it the current directory, and 2 levels above.
for /f "delims=" %%d in ('"pushd %%p\include & cd & popd"') do SET "STINCLUDE=%%d"
)
if not defined STINCLUDE ( :# Try getting the copy in the master environment
for /f "tokens=3" %%v in ('reg query "HKCU\Environment" /v STINCLUDE 2^>NUL') do set "STINCLUDE=%%v"
)
if not exist %STINCLUDE%\make.bat (
>&2 echo %0 Error: Cannot find SysToolsLib's global C include directory. Please define variable STINCLUDE.
exit /b 1
)
if [%1]==[-d] echo "%STINCLUDE%\make.bat" %*
"%STINCLUDE%\make.bat" %*
###############################################################################
# #
# File name Files.mak #
# #
# Description MsvcLibX Specific file dependancies #
# #
# Notes #
# #
# History #
# 2012-10-21 JFL Initial version #
# 2013-03-27 JFL Added debugv.obj and getppid.obj. #
# 2014-02-03 JFL Added readlink.obj. #
# 2014-02-05 JFL Added symlink.obj. #
# 2014-02-06 JFL Added lstat*.obj. #
# 2014-02-10 JFL Added realpath.obj. #
# 2014-02-17 JFL Added err2errno.obj. #
# 2014-02-26 JFL Added filetime.obj. #
# 2014-02-27 JFL Added iconv.obj. #
# 2014-02-28 JFL Added chdir.obj and getcwd.obj. #
# 2014-03-04 JFL Added fopen.obj. #
# 2014-03-06 JFL Added strerror.obj. #
# 2014-03-24 JFL Added access.obj. #
# 2014-03-27 JFL Added spawn.obj. #
# 2014-05-30 JFL Moved here the OBJECTS macro definition from NMakeFile. #
# Added uname.obj and utimes.obj. #
# 2014-06-04 JFL Added clock_gettime.obj and gettimeofday.obj. #
# 2014-06-24 JFL Added fstat64.obj and fstat64i32.obj. #
# 2014-07-01 JFL Added mb2wpath.obj. #
# 2016-09-08 JFL Added basename.obj and dirname.obj. #
# 2016-09-12 JFL Added WIN32_OBJECTS, and several WIN32 UTF-8 routines. #
# 2016-10-11 JFL moved debugm.h to SysToolsLib global C include dir. #
# 2017-02-16 JFL Added open.obj. #
# #
# Copyright 2016 Hewlett Packard Enterprise Development LP #
# Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 #
###############################################################################
# List of object files to build and include in the MsvcLibX library
# IMPORTANT NOTE: Every time you add an object file in the list here, also
# store its specific source file dependancies below.
OBJECTS = \
+access.obj \
+basename.obj \
+chdir.obj \
+clock_gettime.obj \
+debugv.obj \
+dirent.obj \
+dirname.obj \
+err2errno.obj \
+filetime.obj \
+fnmatch.obj \
+fopen.obj \
+fstat64i32.obj \
+fstat64.obj \
+getcwd.obj \
+getopt.obj \
+getppid.obj \
+gettimeofday.obj \
+iconv.obj \
+lstat64i32.obj \
+lstat64.obj \
+main.obj \
+mb2wpath.obj \
+mkdir.obj \
+mkdtemp.obj \
+mkstemp.obj \
+open.obj \
+readlink.obj \
+realpath.obj \
+spawn.obj \
+strerror.obj \
+strndup.obj \
+strptime.obj \
+symlink.obj \
+uname.obj \
+utime.obj \
+utimes.obj \
+xfreopen.obj \
# +lstat32.obj \
# +lstat32i64.obj \
# WIN32 UTF-8 extension routines, used for implementing UTF-8 support for WIN32 libc.
WIN32_OBJECTS = \
+GetFileAttributes.obj \
+GetFileAttributesEx.obj \
+GetFullPathName.obj \
+GetLongPathName.obj \
+fullpath.obj \
# GnuLib routines that I mistakenly defined here
REMOVED_OBJECTS = \
+error.obj \
+initmain.obj \
+xnmalloc.obj \
###############################################################################
# Include files dependancies #
###############################################################################
I=..\include
CI=$(STINCLUDE)
$(I)\chdir.h: $(I)\unistd.h $(I)\iconv.h $(CI)\debugm.h
$(I)\config.h: $(I)\msvclibx.h $(I)\stdbool.h $(I)\unistd.h
$(I)\direct.h: $(I)\msvclibx.h
$(I)\dirent.h: $(I)\inttypes.h $(I)\sys\stat.h
$(I)\error.h: $(I)\msvclibx.h
# $(I)\fadvise.h:
$(I)\fcntl.h: $(I)\msvclibx.h
$(I)\fnmatch.h: $(I)\msvclibx.h
$(I)\getcwd.h: $(I)\unistd.h $(CI)\debugm.h
# $(I)\getopt.h:
$(I)\grp.h: $(I)\msvclibx.h
# $(I)\inttypes.h:
# $(I)\msvclibx.h:
# $(I)\netdb.h:
$(I)\process.h: $(I)\msvclibx.h
$(I)\pwd.h: $(I)\msvclibx.h
# $(I)\regex.h:
$(I)\sys\stat.h: $(I)\msvclibx.h $(I)\sys\types.h
# $(I)\stdbool.h:
# $(I)\stdint.h:
$(I)\stdio.h: $(I)\msvclibx.h
# $(I)\stdio--.h:
$(I)\stdlib.h: $(I)\msvclibx.h
# $(I)\system.h:
$(I)\unistd.h: $(I)\msvclibx.h $(I)\dirent.h
# $(I)\utime.h:
$(I)\windowsU.h: $(I)\msvclibx.h
$(I)\xfreopen.h: $(I)\msvclibx.h
$(I)\sys\types.h: $(I)\msvclibx.h
###############################################################################
# Source files dependancies #
###############################################################################
access.c: $(I)\MsvcLibX.h $(CI)\debugm.h
basename.c: $(I)\libgen.h
chdir.c: $(CI)\debugm.h $(I)\iconv.h $(I)\unistd.h
clock_gettime.c: $(I)\MsvcLibX.h $(I)\time.h $(I)\sys\stat.h
debugv.c: $(CI)\debugm.h
dirent.c: $(CI)\debugm.h $(I)\dirent.h $(I)\sys\stat.h $(I)\unistd.h
dirname.c: $(I)\libgen.h
err2errno.c: $(I)\MsvcLibX.h $(CI)\debugm.h
error.c: $(I)\config.h $(I)\error.h
filetime.c: $(I)\sys\stat.h
fnmatch.c: $(CI)\debugm.h $(I)\fnmatch.h
fopen.c: $(I)\MsvcLibX.h
fstat64.c: fstat.c $(CI)\debugm.h $(I)\dirent.h $(I)\MsvcLibX.h $(I)\sys\stat.h $(I)\stdint.h
fstat64i32.c: fstat.c $(CI)\debugm.h $(I)\dirent.h $(I)\MsvcLibX.h $(I)\sys\stat.h $(I)\stdint.h
fullpath.c: $(I)\stdlib.h $(I)\limits.h
getcwd.c: $(CI)\debugm.h $(I)\unistd.h
GetFileAttributesU.c: $(I)\windowsU.h $(I)\limits.h
GetFileAttributesExU.c: $(I)\windowsU.h $(I)\limits.h
GetFullPathNameU.c: $(I)\windowsU.h $(I)\limits.h
GetLongPathNameU.c: $(I)\windowsU.h $(I)\limits.h
getopt.c: $(I)\getopt.h
# getppid.c:
gettimeofday.c: $(I)\MsvcLibX.h $(I)\time.h $(I)\sys\time.h
grp.c: $(I)\grp.h
iconv.c: $(I)\iconv.h
initmain.c: $(I)\config.h
lstat32.c: lstat.c $(CI)\debugm.h $(I)\dirent.h $(I)\MsvcLibX.h $(I)\sys\stat.h $(I)\stdint.h $(I)\unistd.h
lstat32i64.c: lstat.c $(CI)\debugm.h $(I)\dirent.h $(I)\MsvcLibX.h $(I)\sys\stat.h $(I)\stdint.h $(I)\unistd.h
lstat64.c: lstat.c $(CI)\debugm.h $(I)\dirent.h $(I)\MsvcLibX.h $(I)\sys\stat.h $(I)\stdint.h $(I)\unistd.h
lstat64i32.c: lstat.c $(CI)\debugm.h $(I)\dirent.h $(I)\MsvcLibX.h $(I)\sys\stat.h $(I)\stdint.h $(I)\unistd.h
main.c: $(I)\MsvcLibX.h
mb2wpath.c: $(I)\MsvcLibX.h $(CI)\debugm.h
mkdir.c: $(I)\MsvcLibX.h $(I)\sys\stat.h
mkdtemp.c: $(I)\unistd.h
mkstemp.c: $(I)\unistd.h
open.c: $(I)\MsvcLibX.h $(I)\fcntl.h $(CI)\debugm.h
pwd.c: $(I)\pwd.h
readlink.c: $(CI)\debugm.h $(I)\unistd.h $(I)\reparsept.h
realpath.c: $(CI)\debugm.h $(I)\unistd.h
spawm.c: $(CI)\debugm.h $(I)\MsvcLibX.h $(I)\process.h
strerror.c: $(I)\MsvcLibX.h
# strndup.c:
# strptime.c:
symlink.c: $(CI)\debugm.h $(I)\reparsept.h $(I)\unistd.h
uname.c: $(I)\MsvcLibX.h $(I)\sys\utsname.h
utime.c: $(CI)\debugm.h $(I)\unistd.h $(I)\utime.h $(I)\sys\time.h
xfreopen.c: $(I)\xfreopen.h
xnmalloc.c: $(I)\config.h
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename GetFileAttributes.c *
* *
......@@ -9,14 +9,14 @@
* History: *
* 2016-09-12 JFL Created this file. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#ifdef _WIN32 /* Automatically defined when targeting a Win32 application */
#include <windows.h> /* Also includes MsvcLibX' WIN32 UTF-8 extensions */
#include <limits.h>
#include "msvcLimits.h"
/*---------------------------------------------------------------------------*\
* *
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename GetFileAttributesEx.c *
* *
......@@ -9,14 +9,14 @@
* History: *
* 2016-09-12 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#ifdef _WIN32 /* Automatically defined when targeting a Win32 application */
#include <windows.h> /* Also includes MsvcLibX' WIN32 UTF-8 extensions */
#include <limits.h>
#include "msvcLimits.h"
/*---------------------------------------------------------------------------*\
* *
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename GetFullPathName.c *
* *
......@@ -9,15 +9,15 @@
* History: *
* 2016-09-12 JFL Created this file, from the routine in truename.c. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#ifdef _WIN32 /* Automatically defined when targeting a Win32 application */
#include <windows.h> /* Also includes MsvcLibX' WIN32 UTF-8 extensions */
#include <limits.h>
#include "debugm.h" /* MsvcLibX debugging macros */
#include "msvcLimits.h"
#include "msvcDebugm.h" /* MsvcLibX debugging macros */
/*---------------------------------------------------------------------------*\
* *
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename GetLongPathName.c *
* *
......@@ -9,15 +9,15 @@
* History: *
* 2016-09-12 JFL Created this file, from the routine in truename.c. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#ifdef _WIN32 /* Automatically defined when targeting a Win32 application */
#include <windows.h> /* Also includes MsvcLibX' WIN32 UTF-8 extensions */
#include <limits.h>
#include "debugm.h" /* MsvcLibX debugging macros */
#include "msvcLimits.h"
#include "msvcDebugm.h" /* MsvcLibX debugging macros */
/*---------------------------------------------------------------------------*\
* *
......
###############################################################################
# #
# File name NMakefile #
# #
# Description An NMake file for making all MsvcLibX library versions #
# #
# Notes make.bat looks for a default nmake file called nmakefile. #
# #
# History #
# 2012-10-21 JFL Initial version #
# 2014-03-05 JFL Generate the DOS version only if DOS tools are present. #
# 2014-04-22 JFL Fixed the clean target to work even without 16-bits tools.#
# 2014-05-30 JFL Moved the OBJECTS macro definition to Files.mak. #
# 2014-12-03 JFL Fixed the zip target creation. #
# 2015-11-06 JFL Added support for a Win95 version. #
# 2016-01-11 JFL Added a rule to create the common ..\lib directory. #
# 2016-07-05 JFL Fixed a typo preventing the build of DOS S Debug version. #
# 2016-09-26 JFL Added macro LIBDIR, depending on OUTDIR. #
# Copy the include files to $(OUTDIR). #
# 2016-10-04 JFL Make sure nothing is displayed when doing a make clean. #
# 2016-10-06 JFL Added targets mostlyclean & distclean. #
# 2016-10-11 JFL Adapted for use with make files in the global include dir.#
# 2016-10-13 JFL Added target cleanenv. #
# 2016-11-03 JFL Added target config. #
# Updated the cleanenv: script to display the reg command #
# it uses to delete the global environment variable. #
# 2016-11-07 JFL Place LIBDIR in the parent directory even if OUTDIR defnd.#
# Do not copy include files to OUTDIR anymore. #
# 2016-11-16 JFL Removed the rule for copying INCDIR, not used anymore. #
# 2017-02-16 JFL Default goals now depend on the existence of their #
# corresponding make file. #
# #
# Copyright 2016 Hewlett Packard Enterprise Development LP #
# Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 #
###############################################################################
!IF DEFINED(MESSAGES)
!MESSAGE Started MsvcLibX/src/NMakefile in $(MAKEDIR) # Display this make file name
!ENDIF
!IF DEFINED(OUTDIR)
OD=$(OUTDIR)^\
!IF "$(OUTDIR:\=)"=="$(OUTDIR)"
LIBDIR=..\$(OUTDIR)\lib # If OUTDIR is relative, put it in MsvcLibX top directory
!ELSE
LIBDIR=$(OUTDIR)\lib # If OUTDIR is absolute, use it as is
!ENDIF
!ELSE
OD=
LIBDIR=..\lib
!ENDIF
MSG=>con echo # Command for writing a progress message on the console
HEADLINE=$(MSG).&$(MSG) # Output a blank line, then a message
# Default goal: Generate all versions
all: headline \
!IF DEFINED(DOS_CC) && EXIST("$(STINCLUDE)\DOS.mak")
$(OD)DOS\MsvcLibX.lib \
!ENDIF
!IF DEFINED(WIN95_CC) && EXIST("$(STINCLUDE)\WIN95.mak")
$(OD)WIN95\MsvcLibX.lib \
!ENDIF
!IF DEFINED(WIN32_CC) && EXIST("$(STINCLUDE)\WIN32.mak")
$(OD)WIN32\MsvcLibX.lib \
!ENDIF
!IF DEFINED(WIN64_CC) && EXIST("$(STINCLUDE)\WIN64.mak")
$(OD)WIN64\MsvcLibX.lib \
!ENDIF
!IF DEFINED(DOS_CC) && EXIST("$(STINCLUDE)\DOS.mak")
$(OD)DOS\DEBUG\MsvcLibX.lib \
!ENDIF
!IF DEFINED(WIN95_CC) && EXIST("$(STINCLUDE)\WIN95.mak")
$(OD)WIN95\DEBUG\MsvcLibX.lib \
!ENDIF
!IF DEFINED(WIN32_CC) && EXIST("$(STINCLUDE)\WIN32.mak")
$(OD)WIN32\DEBUG\MsvcLibX.lib \
!ENDIF
!IF DEFINED(WIN64_CC) && EXIST("$(STINCLUDE)\WIN64.mak")
$(OD)WIN64\DEBUG\MsvcLibX.lib \
!ENDIF
headline:
$(HEADLINE) Building all MsvcLibX library versions
# Define the OBJECTS macro = the list of object files to include in the library
!INCLUDE "Files.mak"
# Create the common libs directory
$(LIBDIR):
$(HEADLINE) Creating directory $(LIBDIR:..=MsvcLibX)
md $(LIBDIR)
# Rules for building specific versions of the MsvcLibX library
$(OD)DOS\MsvcLibX.lib: $(OD)DOS\BIN\T\MsvcLibX.lib $(OD)DOS\BIN\S\MsvcLibX.lib $(OD)DOS\BIN\L\MsvcLibX.lib
@echo Done building all DOS release libraries
$(OD)DOS\DEBUG\MsvcLibX.lib: $(OD)DOS\DEBUG\BIN\T\MsvcLibX.lib $(OD)DOS\DEBUG\BIN\S\MsvcLibX.lib $(OD)DOS\DEBUG\BIN\L\MsvcLibX.lib
@echo Done building all DOS debug libraries
$(OD)DOS\BIN\T\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library DOS tiny release version
set OBJECTS=$(OBJECTS)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\DOS.mak "DEBUG=0" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)DOS\OBJ\T\%" "MEM=T" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXdt.lib
$(OD)DOS\BIN\S\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library DOS small release version
set OBJECTS=$(OBJECTS)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\DOS.mak "DEBUG=0" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)DOS\OBJ\S\%" "MEM=S" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXds.lib
$(OD)DOS\BIN\L\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library DOS large release version
set OBJECTS=$(OBJECTS)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\DOS.mak "DEBUG=0" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)DOS\OBJ\L\%" "MEM=L" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXdl.lib
$(OD)WIN95\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library WIN95 release version
set OBJECTS=$(OBJECTS) $(WIN32_OBJECTS)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\WIN95.mak "DEBUG=0" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)WIN95\OBJ\%" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXw95.lib
$(OD)WIN32\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library WIN32 release version
set OBJECTS=$(OBJECTS) $(WIN32_OBJECTS)
set OD=$(OD)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\WIN32.mak "DEBUG=0" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)WIN32\OBJ\%" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXw32.lib
$(OD)WIN64\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library WIN64 release version
set OBJECTS=$(OBJECTS) $(WIN32_OBJECTS)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\WIN64.mak "DEBUG=0" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)WIN64\OBJ\%" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXw64.lib
$(OD)DOS\DEBUG\BIN\T\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library DOS tiny debug version
set OBJECTS=$(OBJECTS)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\DOS.mak "DEBUG=1" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)DOS\DEBUG\OBJ\T\%" "MEM=T" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXdtd.lib
$(OD)DOS\DEBUG\BIN\S\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library DOS small debug version
set OBJECTS=$(OBJECTS)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\DOS.mak "DEBUG=1" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)DOS\DEBUG\OBJ\S\%" "MEM=S" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXdsd.lib
$(OD)DOS\DEBUG\BIN\L\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library DOS large debug version
set OBJECTS=$(OBJECTS)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\DOS.mak "DEBUG=1" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)DOS\DEBUG\OBJ\L\%" "MEM=L" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXdld.lib
$(OD)WIN95\DEBUG\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library WIN95 debug version
set OBJECTS=$(OBJECTS) $(WIN32_OBJECTS)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\WIN95.mak "DEBUG=1" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)WIN95\DEBUG\OBJ\%" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXw95d.lib
$(OD)WIN32\DEBUG\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library WIN32 debug version
set OBJECTS=$(OBJECTS) $(WIN32_OBJECTS)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\WIN32.mak "DEBUG=1" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)WIN32\DEBUG\OBJ\%" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXw32d.lib
$(OD)WIN64\DEBUG\MsvcLibX.lib: $(LIBDIR) NUL
$(HEADLINE) Building MsvcLibX library WIN64 debug version
set OBJECTS=$(OBJECTS) $(WIN32_OBJECTS)
$(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\WIN64.mak "DEBUG=1" "PROGRAM=MsvcLibX" "OBJECTS=%OBJECTS:+=+$(OD)WIN64\DEBUG\OBJ\%" dirs $@
if exist $@ copy $@ $(LIBDIR)\MsvcLibXw64d.lib
# Erase all global environment variables created by this build
VARS=MSVCLIBX # Global environment variables generated here
cleanenv:
call <<"$(TMP)\cleanenv-$(PID).bat" &:# Delete variables created here
@echo off
setlocal EnableExtensions EnableDelayedExpansion
set "KEY=HKCU\Environment"
if not "$(VARS)"=="" for %%v in ($(VARS)) do @(
>>"$(TMP)\cleanenv-$(PID).lst" (echo %%v) &:# Pass the name back to make.bat, for deleting it in the current shell environment
set "VALUE="
for /f "tokens=1,3" %%a in ('reg query "%KEY%" ^| findstr /i /b /r /c:" *%%v "') do set VALUE="%%b"
if defined VALUE ( :# The global environment variable exists. Delete it, using its actual name with the correct case.
set CMD=reg delete "%KEY%" /v %%v /f
echo !CMD!
!CMD! >NUL
)
)
<<
# Dummy target, to delete all files built by these make files
clean mostlyclean distclean:
rem # Delete temporary files
-for /f "delims=" %f in ('dir /b /s *~ *.bak #*# 2^>NUL') do @del "%f"
rem # Delete files built by this nmakefile
-for /f "delims=" %f in ('dir /b /s ..\*.zip *.log 2^>NUL') do @del "%f"
rem # Delete files built by the DOS.mak, WIN32.mak, WIN64.mak make files
rem # But make DOS.mak will fail if 16-bit tools are missing. Workaround:
-if exist $(STINCLUDE)\DOS.mak $(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\DOS.mak clean
if exist $(OD)DOS rd /s /q $(OD)DOS
rem # No such problem with the others, but just in case, do the same.
-if exist $(STINCLUDE)\WIN95.mak $(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\WIN95.mak clean
if exist $(OD)WIN95 rd /s /q $(OD)WIN95
-if exist $(STINCLUDE)\WIN32.mak $(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\WIN32.mak clean
if exist $(OD)WIN32 rd /s /q $(OD)WIN32
-if exist $(STINCLUDE)\WIN64.mak $(MAKE) /$(MAKEFLAGS) /f $(STINCLUDE)\WIN64.mak clean
if exist $(OD)WIN64 rd /s /q $(OD)WIN64
!IF DEFINED(OUTDIR)
-rd /S /Q $(OUTDIR) >NUL 2>&1
!ENDIF
-if "$@"=="distclean" del /Q config.*.bat >NUL 2>&1
# Dummy target, to build a source archive
dist zip:
$(MSG) Building ..\MsvcLibX.zip
cd ..
if exist MsvcLibX.zip del MsvcLibX.zip
set PATH=$(PATH);C:\Program Files\7-zip
7z.exe a MsvcLibX.zip *.txt src\*.bat src\*.mak src\*makefile src\exe src\*.c -r include\*.h lib\
rem # Delete files that got dragged in by wild cards, but that we don't want in the source zip.
7z.exe d MsvcLibX.zip src\config.*.bat lib\*.lib
cd src
# Run the configure.bat script in every subdirectory
config:
rem Nothing to do in $(MAKEDIR) as there is no further child level
# Dummy target, to display a help screen
help:
type <<
Targets:
all Rebuild all library versions (Default)
clean Delete all files built here, and all backup files
distclean Do a clean, then delete config.*.bat files
zip Build a source archive in ..\MsvcLibX.zip. Requires 7-zip.
<<NOKEEP
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename access.c *
* *
......@@ -10,17 +10,18 @@
* 2014-03-24 JFL Created this module. *
* 2014-07-02 JFL Added support for pathnames >= 260 characters. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#define _CRT_SECURE_NO_WARNINGS 1 /* Avoid Visual C++ security warnings */
#include <stdio.h>
#include <errno.h>
#include <io.h>
#include "msvcStdio.h"
#include "msvclibx.h"
#include "debugm.h"
#include "msvcDebugm.h"
#include "msvcLimits.h"
#ifdef _WIN32
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename basename.c *
* *
......@@ -12,7 +12,7 @@
* History *
* 2016-09-08 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -20,11 +20,11 @@
#define _CRT_SECURE_NO_WARNINGS 1 /* Avoid Visual C++ 2005 security warnings */
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <libgen.h>
#include <limits.h>
#include "msvcStdlib.h"
#include "msvcLibgen.h"
#include "msvcLimits.h"
#define TRUE 1
#define FALSE 0
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename chdir.c *
* *
......@@ -10,7 +10,7 @@
* 2014-02-28 JFL Created this module. *
* 2014-07-02 JFL Added support for pathnames >= 260 characters. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -18,12 +18,14 @@
/* Microsoft C libraries include files */
#include <errno.h>
#include <stdio.h>
#include <string.h>
/* MsvcLibX library extensions */
#include <unistd.h>
#include <iconv.h>
#include "debugm.h"
#include "msvcStdio.h"
#include "msvcUnistd.h"
#include "msvcIconv.h"
#include "msvcDebugm.h"
#include "msvcLimits.h"
#include "sys/msvcTypes.h"
#if defined(_MSDOS)
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: clock_gettime.c *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-06-04 JFL Created this file. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -31,8 +31,8 @@
#define WIN32_LEAN_AND_MEAN /* Avoid lots of unnecessary inclusions */
#include <windows.h>
#include <sys/stat.h> /* For MsvcLibX's Filetime2Timespec */
#include "msvcTime.h"
#include "sys/msvcStat.h" /* For MsvcLibX's Filetime2Timespec */
int clock_gettime(clockid_t clock_id, struct timespec *pTS) {
FILETIME ft;
......
:# config.DESKTOP-U79TD6T.bat generated by configure.bat on 2020/05/19 ܶ 7:50:15.02
:#
:# If changes are needeed, do not edit this file, but instead create a new script
:# called configure.YOURCHOICE.bat. This new script will be invoked automatically
:# by configure.bat while creating this file. Then your script can write extra
:# definitions, or change some of the variables before configure.bat writes them.
:#
:# Invoke configure.bat manually if anything changes in the tools config, such as
:# installing a Visual Studio update, or updating a configure.XXX.bat script.
set "HAS_STINCLUDE=1" &:# Found the System Tools global C includes
set "STINCLUDE=C:\Users\admin\Desktop\temp\MyGitHub\C\include" &:# System Tools global C includes
set "HAS_MSVCLIBX=1" &:# Found the MSVC Library eXtensions library
set "MSVCLIBX=C:\Users\admin\Desktop\temp\MyGitHub\C\MsvcLibX" &:# MSVC Library eXtensions library
set "HAS_SDK_FLAGS=/DHAS_STINCLUDE=1 /DHAS_MSVCLIBX=1" &:# SDK detection flags for the C compiler
SET "PF32=C:\Program Files (x86)" &:# 32-bits Program Files
SET "PF64=C:\Program Files" &:# 64-bits Program Files
SET "ARCH=AMD64" &:# PROCESSOR_ARCHITECTURE
SET "MASM=" &:# Microsoft 16-bits Assembler base path
SET "MSVC=" &:# Microsoft 16-bits Visual C++ base path
SET "MAPSYM=" &:# 16-bits debugging symbols generator
SET "VSTUDIOLONG=C:\Program Files (x86)\Microsoft Visual Studio 14.0" &:# Microsoft Visual Studio (Long path)
SET "VSTUDIO=C:\PROGRA~2\MICROS~2.0" &:# Microsoft Visual Studio (Short path)
SET "VSCOMMONLONG=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7" &:# Microsoft Visual Studio Common Files (Long path)
SET "VSCOMMON=C:\PROGRA~2\MICROS~2.0\Common7" &:# Microsoft Visual Studio Common Files (Short path)
SET "VSIDELONG=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE" &:# Microsoft Visual Studio IDE Files (Long path)
SET "VSIDE=C:\PROGRA~2\MICROS~2.0\Common7\IDE" &:# Microsoft Visual Studio IDE Files (Short path)
SET "VSTOOLSLONG=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools" &:# Microsoft Visual Studio Tools (Long paths)
SET "VSTOOLS=C:\PROGRA~2\MICROS~2.0\Common7\Tools" &:# Microsoft Visual Studio Tools (Short paths)
SET "MSVC32LONG=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC" &:# Microsoft Visual C++ 32/64 bits (Long path)
SET "MSVC32=C:\PROGRA~2\MICROS~2.0\VC" &:# Microsoft Visual C++ 32/64 bits (Short path)
SET "WIN_CP=936" &:# Windows Code Page
SET "WIN_CS=gb2312" &:# Windows Character Set
SET "DOS_CP=936" &:# DOS Code Page
SET "DOS_CS=gb2312" &:# DOS Character Set
SET "AS=" &:# Assembler
SET "CC=" &:# C compiler
SET "INCLUDE=C:\Users\admin\Desktop\temp\MyGitHub\C\include" &:# Include paths. Define USER_INCLUDE if needed.
SET "LK=" &:# Linker
SET "LIB=" &:# Libraries paths. Define USER_LIBS if needed.
SET "LB=" &:# Library manager
SET "RC=" &:# Resource compiler
SET "MT=" &:# Manifest tool
SET "DOS_CC=" &:# Microsoft Visual C++ 16-bits compiler
SET "DOS_AS=" &:# Microsoft 16-bits assembler
SET "DOS_LK=" &:# Microsoft 16-bits linker
SET "DOS_LB=" &:# Microsoft 16-bits librarian
SET "DOS_RC=" &:# Microsoft 16-bits resource compiler
SET "DOS_MT=" &:# Microsoft 16-bits manifest tool
SET "DOS_PATH=;C:\Windows\System32;C:\Windows" &:# All tools paths for 16-bits compilation
SET "DOS_VCINC=" &:# Visual C++ 16-bits compiler include dir for MsvcLibX include_next
SET "DOS_CRTINC=" &:# Visual C++ 16-bits CRT library include dir for MsvcLibX include_next
SET "DOS_INCPATH=" &:# Include paths for 16-bits compilation
SET "DOS_LIBPATH=" &:# Libraries paths for 16-bits linking
SET "DOS_WINSDK=" &:# Microsoft Windows 16-bits SDK
SET "DOS_WINSDKINC=" &:# Microsoft Windows 16-bits SDK Include directory
SET "WIN95_CC=" &:# Microsoft Visual C++ 32-bits compiler
SET "WIN95_AS=" &:# Microsoft 32-bits assembler
SET "WIN95_LK=" &:# Microsoft 32-bits linker
SET "WIN95_LB=" &:# Microsoft 32-bits librarian
SET "WIN95_RC=" &:# Microsoft 32-bits resource compiler
SET "WIN95_MT=" &:# Microsoft 32-bits manifest tool
SET "WIN95_PATH=;C:\Windows\System32;C:\Windows" &:# All tools paths for 32-bits compilation
SET "WIN95_VCINC=" &:# Visual C++ 32-bits compiler include dir for MsvcLibX include_next
SET "WIN95_CRTINC=" &:# Visual C++ 32-bits CRT library include dir for MsvcLibX include_next
SET "WIN95_INCPATH=" &:# Include paths for 32-bits compilation
SET "WIN95_LIBPATH=" &:# Libraries paths for 32-bits linking
SET "WIN95_WINSDK=" &:# Microsoft Windows 32-bits SDK
SET "WIN95_WINSDKINC=" &:# Microsoft Windows 32-bits SDK Include directory
SET "WIN32_CC="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.EXE"" &:# Microsoft Visual C++ 32-bits compiler
SET "WIN32_AS="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\ML.EXE"" &:# Microsoft 32-bits assembler
SET "WIN32_LK="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\LINK.EXE"" &:# Microsoft 32-bits linker
SET "WIN32_LB="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\LIB.EXE"" &:# Microsoft 32-bits librarian
SET "WIN32_RC=" &:# Microsoft 32-bits resource compiler
SET "WIN32_MT=" &:# Microsoft 32-bits manifest tool
SET "WIN32_PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Windows\System32;C:\Windows" &:# All tools paths for 32-bits compilation
SET "WIN32_VCINC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" &:# Visual C++ 32-bits compiler include dir for MsvcLibX include_next
SET "WIN32_CRTINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" &:# Visual C++ 32-bits CRT library include dir for MsvcLibX include_next
SET "WIN32_INCPATH=C:\Users\admin\Desktop\temp\MyGitHub\C\MsvcLibX\include;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include;:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt" &:# Include paths for 32-bits compilation
SET "WIN32_LIBPATH=C:\Users\admin\Desktop\temp\MyGitHub\C\MsvcLibX\lib;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86" &:# Libraries paths for 32-bits linking
SET "WIN32_WINSDK=C:\Program Files (x86)\Windows Kits\10" &:# Microsoft Windows 32-bits SDK
SET "WIN32_WINSDKINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0" &:# Microsoft Windows 32-bits SDK Include directory
SET "IA64_CC=" &:# Microsoft Visual C++ IA64 compiler
SET "IA64_AS=" &:# Microsoft IA64 assembler
SET "IA64_LK=" &:# Microsoft IA64 linker
SET "IA64_LB=" &:# Microsoft IA64 librarian
SET "IA64_RC=" &:# Microsoft IA64 resource compiler
SET "IA64_MT=" &:# Microsoft IA64 manifest tool
SET "IA64_PATH=;C:\Windows\System32;C:\Windows" &:# All tools paths for IA64 compilation
SET "IA64_VCINC=" &:# Visual C++ IA64 compiler include dir for MsvcLibX include_next
SET "IA64_CRTINC=" &:# Visual C++ IA64 CRT library include dir for MsvcLibX include_next
SET "IA64_INCPATH=" &:# Include paths for IA64 compilation
SET "IA64_LIBPATH=" &:# Libraries paths for IA64 linking
SET "IA64_WINSDK=" &:# Microsoft Windows IA64 SDK
SET "IA64_WINSDKINC=" &:# Microsoft Windows IA64 SDK Include directory
SET "WIN64_CC="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\CL.EXE"" &:# Microsoft Visual C++ 64-bits compiler
SET "WIN64_AS="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\ML64.EXE"" &:# Microsoft 64-bits assembler
SET "WIN64_LK="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\LINK.EXE"" &:# Microsoft 64-bits linker
SET "WIN64_LB="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\LIB.EXE"" &:# Microsoft 64-bits librarian
SET "WIN64_RC=" &:# Microsoft 64-bits resource compiler
SET "WIN64_MT=" &:# Microsoft 64-bits manifest tool
SET "WIN64_PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Windows\System32;C:\Windows" &:# All tools paths for 64-bits compilation
SET "WIN64_VCINC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" &:# Visual C++ 64-bits compiler include dir for MsvcLibX include_next
SET "WIN64_CRTINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" &:# Visual C++ 64-bits CRT library include dir for MsvcLibX include_next
SET "WIN64_INCPATH=C:\Users\admin\Desktop\temp\MyGitHub\C\MsvcLibX\include;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include;:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt" &:# Include paths for 64-bits compilation
SET "WIN64_LIBPATH=C:\Users\admin\Desktop\temp\MyGitHub\C\MsvcLibX\lib;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\amd64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64" &:# Libraries paths for 64-bits linking
SET "WIN64_WINSDK=C:\Program Files (x86)\Windows Kits\10" &:# Microsoft Windows 64-bits SDK
SET "WIN64_WINSDKINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0" &:# Microsoft Windows 64-bits SDK Include directory
SET "ARM_CC="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_arm\CL.EXE"" &:# Microsoft Visual C++ ARM compiler
SET "ARM_AS="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_arm\ARMASM.EXE"" &:# Microsoft ARM assembler
SET "ARM_LK="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_arm\LINK.EXE"" &:# Microsoft ARM linker
SET "ARM_LB="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_arm\LIB.EXE"" &:# Microsoft ARM librarian
SET "ARM_RC=" &:# Microsoft ARM resource compiler
SET "ARM_MT=" &:# Microsoft ARM manifest tool
SET "ARM_PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_arm;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Windows\System32;C:\Windows" &:# All tools paths for ARM compilation
SET "ARM_VCINC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" &:# Visual C++ ARM compiler include dir for MsvcLibX include_next
SET "ARM_CRTINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" &:# Visual C++ ARM CRT library include dir for MsvcLibX include_next
SET "ARM_INCPATH=C:\Users\admin\Desktop\temp\MyGitHub\C\MsvcLibX\include;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include;:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt" &:# Include paths for ARM compilation
SET "ARM_LIBPATH=C:\Users\admin\Desktop\temp\MyGitHub\C\MsvcLibX\lib;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\arm" &:# Libraries paths for ARM linking
SET "ARM_WINSDK=C:\Program Files (x86)\Windows Kits\10" &:# Microsoft Windows ARM SDK
SET "ARM_WINSDKINC=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0" &:# Microsoft Windows ARM SDK Include directory
SET "ARM64_CC=" &:# Microsoft Visual C++ ARM64 compiler
SET "ARM64_AS=" &:# Microsoft ARM64 assembler
SET "ARM64_LK=" &:# Microsoft ARM64 linker
SET "ARM64_LB=" &:# Microsoft ARM64 librarian
SET "ARM64_RC=" &:# Microsoft ARM64 resource compiler
SET "ARM64_MT=" &:# Microsoft ARM64 manifest tool
SET "ARM64_PATH=;C:\Windows\System32;C:\Windows" &:# All tools paths for ARM64 compilation
SET "ARM64_VCINC=" &:# Visual C++ ARM64 compiler include dir for MsvcLibX include_next
SET "ARM64_CRTINC=" &:# Visual C++ ARM64 CRT library include dir for MsvcLibX include_next
SET "ARM64_INCPATH=" &:# Include paths for ARM64 compilation
SET "ARM64_LIBPATH=" &:# Libraries paths for ARM64 linking
SET "ARM64_WINSDK=" &:# Microsoft Windows ARM64 SDK
SET "ARM64_WINSDKINC=" &:# Microsoft Windows ARM64 SDK Include directory
:# List of commands to run when make.bat exits
SET "POST_MAKE_ACTIONS=set "MSVCLIBX=C:\Users\admin\Desktop\temp\MyGitHub\C\MsvcLibX""
exit /b 0 &:# Configuration done successfully
@echo off
:#*****************************************************************************
:# *
:# Filename: configure.MsvcLibX.bat *
:# *
:# Description: Special make actions for rebuilding the MsvcLibX library *
:# *
:# Notes: *
:# *
:# History: *
:# 2015-11-06 JFL Created this script. *
:# 2016-09-27 JFL Correct the final MSVCLIBX if there's a different OUTDIR. *
:# 2016-11-03 JFL Removed the side effect creating %OUTDIR%. *
:# 2016-11-07 JFL Removed the dependency on OUTDIR. *
:# Immediately set the system environment. *
:# 2016-11-16 JFL Allow using a predefined alias for this lib base path. *
:# 2016-12-16 JFL Only use setx if requested by user, with PERSISTENT_VARS. *
:# *
:# © Copyright 2016 Hewlett Packard Enterprise Development LP *
:# Licensed under the Apache 2.0 license www.apache.org/licenses/LICENSE-2.0 *
:#*****************************************************************************
:# Get the full pathname of the MsvcLibX library base directory
if defined MSVCLIBX if not exist "%MSVCLIBX%\include\msvclibx.h" set "MSVCLIBX=" &:# Allow overriding with another alias name, but ignore invalid overrides
if not defined MSVCLIBX for /f "delims=" %%d in ('"pushd .. & cd & popd"') do SET "MSVCLIBX=%%d" &:# Default: Use the current directory
:# Declare the SDKs and libraries we need
%BEGIN_SDK_DEFS%
%USE_SDK% MSVCLIBX &:# Triggers the emission of a %CONFIG% record for MSVCLIBX
%END_SDK_DEFS%
:# Set the local environment variable just before make exits, so that future commands in this CMD window have it.
%ADD_POST_MAKE_ACTION% set "MSVCLIBX=%MSVCLIBX%"
:# Set the system environment variable, so that other CMD windows opened later on inherit it
if defined PERSISTENT_VARS setx MSVCLIBX "%MSVCLIBX%" >NUL
@echo off
:#*****************************************************************************
:# *
:# Filename: configure.bat *
:# *
:# Description: Detect system-specific settings and create config.*.bat *
:# *
:# Notes: Proxy script for %STINCLUDE%\configure.bat. *
:# *
:# Make any change needed in %STINCLUDE%\configure.bat. *
:# *
:# History: *
:# 2016-10-10 JFL jf.larvoire@hpe.com created this file. *
:# 2016-12-15 JFL Search for the real make.bat in [.|..|../..]\include. *
:# *
:# Copyright 2016 Hewlett Packard Enterprise Development LP *
:# Licensed under the Apache 2.0 license www.apache.org/licenses/LICENSE-2.0 *
:#*****************************************************************************
:# Get the full pathname of the STINCLUDE library directory
if defined STINCLUDE if not exist "%STINCLUDE%\make.bat" set "STINCLUDE=" &:# Allow overriding with another alias name, but ignore invalid overrides
for %%p in (. .. ..\..) do if not defined STINCLUDE if exist %%p\include\make.bat ( :# Default: Search it the current directory, and 2 levels above.
for /f "delims=" %%d in ('"pushd %%p\include & cd & popd"') do SET "STINCLUDE=%%d"
)
if not defined STINCLUDE ( :# Try getting the copy in the master environment
for /f "tokens=3" %%v in ('reg query "HKCU\Environment" /v STINCLUDE 2^>NUL') do set "STINCLUDE=%%v"
)
if not exist %STINCLUDE%\make.bat (
>&2 echo %0 Error: Cannot find SysToolsLib's global C include directory. Please define variable STINCLUDE.
exit /b 1
)
if [%1]==[-d] echo "%STINCLUDE%\configure.bat" %*
"%STINCLUDE%\configure.bat" %*
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: debugv.c *
* *
......@@ -9,11 +9,11 @@
* History: *
* 2013-03-27 JFL jf.larvoire@hp.com created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#include "debugm.h"
#include "msvcDebugm.h"
#if defined(_DEBUG)
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: dirent.c *
* *
......@@ -30,7 +30,7 @@
* 2015-12-14 JFL Bug fix: WIN32 readdirW always read the root on "D:". *
* Bug fix: DOS opendir failed on root dirs, like "D:\". *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -38,7 +38,7 @@
#define _UTF8_SOURCE /* Generate the UTF-8 version of WIN32 printf & scandir */
#include "dirent.h" /* Include our associated .h, in the same dir as this .c. Do not use <>. */
#include "msvcDirent.h" /* Include our associated .h, in the same dir as this .c. Do not use <>. */
#ifndef _DIRENT_FOR_DOS_WINDOWS
#error "This requires MsvcLibX own version of dirent.h for DOS/Windows"
#endif
......@@ -49,9 +49,10 @@
#include <memory.h>
#include <errno.h>
/* MsvcLibX library extensions */
#include <unistd.h> /* For readlink() */
#include <sys/stat.h> /* For Filetime2String() */
#include "debugm.h" /* Use our house debugging framework */
#include "msvcUnistd.h" /* For readlink() */
#include "sys/msvcStat.h" /* For Filetime2String() */
#include "msvcDebugm.h" /* Use our house debugging framework */
#include "msvcLimits.h" /* Use our house debugging framework */
/*****************************************************************************\
* *
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename dirname.c *
* *
......@@ -12,7 +12,7 @@
* History *
* 2016-09-08 JFL Created this file. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -23,8 +23,8 @@
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <libgen.h>
#include <limits.h>
#include "msvcLibgen.h"
#include "msvcLimits.h"
#define TRUE 1
#define FALSE 0
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename err2errno.c *
* *
......@@ -12,7 +12,7 @@
* Removed a few useless special cases, and added EZERO case.*
* Make sure the global errno is _not_ changed by this funct.*
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -20,7 +20,7 @@
#include <errno.h>
#include <stdio.h>
/* MsvcLibX library extensions */
#include "debugm.h"
#include "msvcDebugm.h"
#ifdef _WIN32
......@@ -65,7 +65,6 @@ int _get_errno_from_oserr(unsigned long dwErr) {
return errno;
}
#else
#pragma message("Using the default " MSVCLIBX_STRINGIZE(_get_errno_from_oserr) "()")
/* Equivalent function in MSVC library. Does not know about symlink errors. */
extern int __cdecl _get_errno_from_oserr(unsigned long oserrno);
#endif
......
#!/bin/bash
#*****************************************************************************#
# #
# Filename: exe #
# #
# Description: Build simple C/C++ programs for Unix/Linux #
# #
# Notes: Usage: ./exe PROGRAM #
# #
# Stores the executables in $OS.$PROC/[Debug/] for #
# consistency with the Windows build tools. #
# This allows sharing sources in a host system, and #
# using VMs for building the various Windows and Linux #
# versions in a set of OS-specific subdirectories. #
# #
# History: #
# 2013-12-16 JFL Added support for MinGW64. #
# 2015-12-12 JFL Help now displays the output directory name. #
# 2016-01-07 JFL Added compilation option -Wall. #
# #
# Copyright 2016 Hewlett Packard Enterprise Development LP #
# Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 #
#*****************************************************************************#
FileNoCase() # Case-independant search for a file.
{
find . -type f | grep -i -E "./$1$" | sed s=./==
}
# Identify the OS
OS=`uname -s`
PROC=`uname -p`
if [[ "$OS" == "OSF1" && "`uname -m`" == "alpha" ]] ; then
OS=Tru64
fi
if [[ "$OS" == "WindowsNT" ]] ; then
OS=WIN32
fi
OUTDIR=$OS.$PROC
if [[ "${OS:0:7}" == "MINGW32" ]] ; then # Ex: "MINGW32_NT-6.1"
OUTDIR=MINGW32 # MigGW shell if NOT case sensitive
# 2013-12-16 Actually, the 64-bits tool chain also reports MINGW32_NT-6.1
# So distinguish the two by whether /mingw is mounted on C:\MinGW or C:\MinGW64
if mount | grep /mingw | grep 64 > /dev/null ; then
OUTDIR=MINGW64 # MigGW shell if NOT case sensitive
fi
fi
if [[ "${OS:0:7}" == "MINGW64" ]] ; then # Ex: ?
OUTDIR=MINGW64
fi
if [[ "${OS:0:6}" == "CYGWIN" ]] ; then # Ex: "CYGWIN_NT-6.1-WOW64"
OUTDIR=cygwin # Cygwin shell if case sensitive, so use lower case
fi
# Command line analysis.
case "$1" in
"" | "-h" | "-?" | --help)
echo "Build simple C/C++ programs, storing the executables in $OUTDIR/"
echo "Usage: ./exe PROGRAM"
exit 0
;;
esac
# Identify the source file and program to build.
PROGRAM=$1
shift
SOURCES=`FileNoCase ${PROGRAM}.c`
CFLAGS="-std=c99 -Wall" # Force compilation in C, even if there are // comments.
if [[ "${SOURCES}" == "" ]] ; then
SOURCES=`FileNoCase ${PROGRAM}.cpp`
CFLAGS="-std=gnu++98 -lstdc++" # Force compilation in C++, even if plain C.
# -lstdc++ prevents error "undefined reference to '__gxx_personality_v0'"
fi
if [[ "${SOURCES}" == "" ]] ; then
echo "Failed to find ${PROGRAM} source."
exit 1
fi
# Make sure our include directories are accessible
if [[ -d "/u/JFL/SRC/Include" ]] ; then
if [[ ":$C_INCLUDE_PATH:" != *:/u/JFL/SRC/Include:* ]] ; then
if [[ "$C_INCLUDE_PATH" == "" ]] ; then
export C_INCLUDE_PATH="/u/JFL/SRC/Include"
else
export C_INCLUDE_PATH="$C_INCLUDE_PATH:/u/JFL/SRC/Include"
fi
fi
fi
echo "# C_INCLUDE_PATH=\"$C_INCLUDE_PATH\""
# Build it.
# gmake CC=gcc CFLAGS="$CFLAGS" SOURCES="$SOURCES" PROGRAM="$PROGRAM" OS="$OS" $*
mkdir -p $OUTDIR
echo "gcc $CFLAGS -U_DEBUG $SOURCES -o $OUTDIR/$PROGRAM"
gcc $CFLAGS -U_DEBUG $SOURCES -o $OUTDIR/$PROGRAM
mkdir -p $OUTDIR/debug
echo "gcc $CFLAGS -D_DEBUG $SOURCES -o $OUTDIR/debug/$PROGRAM"
gcc $CFLAGS -D_DEBUG $SOURCES -o $OUTDIR/debug/$PROGRAM
@echo off
:#*****************************************************************************
:# *
:# Filename: exe.bat *
:# *
:# Description: Front end to make.bat, to simply build multiple targets *
:# *
:# Arguments: Use option -? to display a help screen *
:# *
:# Notes: Builds the 16-bits MS-DOS version if Visual C++ 1.52 is *
:# installed in its default location in C:\MSVC. *
:# *
:# History: *
:# 2003-03-31 JFL Adapted from previous projects *
:# 2014-03-21 JFL Builds the 16-bits MS-DOS version if Visual C++ 1.52 is *
:# installed in its default location in C:\MSVC. *
:# 2014-03-27 JFL Changed option -f to use nmake option /A. *
:# Added option -r for completeness. *
:# 2015-11-13 JFL Adapted to the new multitarget make system. *
:# *
:# Copyright 2016 Hewlett Packard Enterprise Development LP *
:# Licensed under the Apache 2.0 license www.apache.org/licenses/LICENSE-2.0 *
:#*****************************************************************************
setlocal enableextensions enabledelayedexpansion
goto main
:main
set "FORCE=0"
set "ACTION=default"
set "EXEC="
set "MAKEOPTS="
goto get_arg
:next_arg
shift
:get_arg
if .%1.==.-?. goto help
if .%1.==./?. goto help
if .%1.==.-a. set "ACTION=all" & goto next_arg
if .%1.==.-d. set "ACTION=debug" & goto next_arg
if .%1.==.-f. set "FORCE=1" & goto next_arg
if .%1.==.-r. set "ACTION=release" & goto next_arg
if .%1.==.-X. set "EXEC=echo" & goto next_arg
set MAKEOPTS=%2 %3 %4 %5 %6 %7 %8 %9
if "%FORCE%"=="1" set "MAKEOPTS=%MAKEOPTS% /A"
goto %ACTION%
:help
echo.
echo..exe program builder from a C or C++ source
echo.
echo.Usage: exe [options] program [nmake_options]
echo.
echo.Options:
echo.
echo. -? Display this help page
echo. -a Builds all release ^& debug versions (default)
echo. -d Builds all debug versions only
echo. -f Force building all program targets, irrespective of file dates
echo. -r Builds all release versions only
echo. -X Display the make command generated and exit
echo.
echo.Notes:
echo.* exe myprog ^<==^> make myprog.exe debug\myprog.exe
echo.* This builds all possible OS targets
echo.* To force rebuilding all targets, irrespective of their date,
echo. use nmake option /A. So: exe -f myprog ^<==^> exe myprog /A
goto :eof
:release
%EXEC% make %MAKEOPTS% %1.exe
goto :eof
:debug
%EXEC% make %MAKEOPTS% debug\%1.exe
goto :eof
:default
:all
%EXEC% make %MAKEOPTS% %1.exe debug\%1.exe
goto :eof
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename filetime.c *
* *
......@@ -9,17 +9,17 @@
* History: *
* 2014-02-26 JFL Created this module. *
* 2014-03-24 JFL Renamed "statx.h" as the standard <sys/stat.h>. *
* 2014-07-03 JFL Filetime2String: Output time with s precision if possib. *
* 2014-07-03 JFL Filetime2String: Output time with s precision if possib. *
* 2016-09-13 JFL Fixed a warning. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#define _CRT_SECURE_NO_WARNINGS 1 /* Avoid Visual C++ security warnings */
#include <time.h> /* Define time_t */
#include <sys/stat.h>
#include "msvcTime.h" /* Define time_t */
#include "sys/msvcStat.h"
#ifdef _MSDOS
......@@ -230,7 +230,7 @@ struct tm *LocalFileTime(const time_t *pt) {
}
/* Generate a string with the local file time, in the ISO 8601 date/time format */
/* 2014-07-03 Output time with s precision if possible */
/* 2014-07-03 Output time with s precision if possible */
char *Filetime2String(const FILETIME *pFT, char *pBuf, size_t nBufSize) {
FILETIME lft;
SYSTEMTIME sTime;
......@@ -246,7 +246,7 @@ char *Filetime2String(const FILETIME *pFT, char *pBuf, size_t nBufSize) {
uli.LowPart = lft.dwLowDateTime;
uli.HighPart = lft.dwHighDateTime;
iFraction = (int)(uli.QuadPart % 10000000); /* FILETIME has 100ns resolution */
iFraction /= 10; /* Convert 100ns resolution to 1s resolution */
iFraction /= 10; /* Convert 100ns resolution to 1s resolution */
wsprintf(pBuf+19, ".%06d", iFraction);
} else if (nBufSize >= 24) {
wsprintf(pBuf+19, ".%03d", sTime.wMilliseconds);
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: fnmatch.c *
* *
......@@ -16,7 +16,7 @@
* 2014-02-28 JFL Added support for UTF-8 pathnames. *
* 2014-03-05 JFL In debug mode, hide recursive calls. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -26,8 +26,8 @@
#include <string.h>
#include <malloc.h>
#include "fnmatch.h" /* Include our associated .h, in the same dir as this .c. Do not use <>. */
#include "debugm.h"
#include "msvcFnmatch.h" /* Include our associated .h, in the same dir as this .c. Do not use <>. */
#include "msvcDebugm.h"
#ifndef TRUE
#define TRUE 1
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename fstat.c *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-06-24 JFL Created this module. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -21,10 +21,10 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
/* MsvcLibX library extensions */
#include <sys/stat.h>
#include "debugm.h"
#include <stdint.h>
/* MsvcLibX library extensions */
#include "sys/msvcStat.h"
#include "msvcDebugm.h"
#if defined(_MSDOS)
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename fstat64.c *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-06-24 JFL Created this module. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename fstat64i32.c *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-06-24 JFL Created this module. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename fullpath.c *
* *
......@@ -9,7 +9,7 @@
* History *
* 2016-09-13 JFL Created this module with routine from truename.c. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -18,12 +18,12 @@
#define _UTF8_SOURCE /* Generate the UTF-8 version of routines */
#include <stdlib.h>
#include <limits.h>
#include <malloc.h>
#include "msvcLimits.h"
#ifdef _WIN32 /* Automatically defined when targeting a Win32 application */
#include <windows.h> /* Also includes MsvcLibX' WIN32 UTF-8 extensions */
#include "msvcWindows.h" /* Also includes MsvcLibX' WIN32 UTF-8 extensions */
/*---------------------------------------------------------------------------*\
* *
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename getcwd.c *
* *
......@@ -10,7 +10,7 @@
* 2014-02-28 JFL Created this module. *
* 2014-07-02 JFL Added support for pathnames >= 260 characters. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -20,8 +20,9 @@
#include <errno.h>
#include <stdio.h>
/* MsvcLibX library extensions */
#include <unistd.h>
#include "debugm.h"
#include "msvcUnistd.h"
#include "msvcDebugm.h"
#include "msvcLimits.h"
#if defined(_MSDOS)
......
/*-
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
......@@ -40,7 +40,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "getopt.h"
#include "msvcGetopt.h"
#ifndef _DIAGASSERT
#ifdef NDEBUG
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename getppid.c *
* *
......@@ -17,11 +17,11 @@
* History: *
* 2013-03-27 JFL Created this module. *
* *
* © Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#include <unistd.h>
#include "msvcUnistd.h"
#ifdef _WIN32
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename gettimeofday.c *
* *
......@@ -9,14 +9,14 @@
* History *
* 2014-06-04 JFL Created this file. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#include "msvclibx.h"
#include <time.h>
#include <sys/time.h>
#include "msvcTime.h"
#include "sys/msvcTime.h"
#ifdef _MSDOS
/* MS-DOS only has a 1-second resolution on system time.
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename iconv.c *
* *
......@@ -12,7 +12,7 @@
* 2015-12-09 JFL Added routines fputsU and vfprintfU. *
* 2016-09-13 JFL Fixed warnings in fputsU. Do not change the input buffer. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -23,8 +23,9 @@
#include <stdio.h>
#include <string.h>
/* MsvcLibX library extensions */
#include "iconv.h"
#include "debugm.h"
#include "msvcIconv.h"
#include "msvcDebugm.h"
#include "msvcLimits.h"
#if defined(_MSDOS)
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename lstat.c *
* *
......@@ -17,7 +17,7 @@
* 2014-03-24 JFL Renamed "statx.h" as the standard <sys/stat.h>. *
* 2014-06-30 JFL Added support for 32K Unicode paths. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -29,13 +29,14 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
/* MsvcLibX library extensions */
#include "msvclibx.h"
#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h> /* For ResolveLinks() definition */
#include "debugm.h"
#include <stdint.h>
#include <sys/msvcStat.h>
#include "msvcDirent.h"
#include "msvcUnistd.h" /* For ResolveLinks() definition */
#include "msvcDebugm.h"
#include "msvcLimits.h"
#if defined(_MSDOS)
/* Make sure it's only defined it in one of the lstatxxx versions */
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename lstat32.c *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-02-14 JFL Created this module. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename lstat32i64.c *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-02-14 JFL Created this module. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename lstat.c *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-02-14 JFL Created this module. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename lstat64i32.c *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-02-14 JFL Created this module. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename main.c *
* *
......@@ -12,20 +12,20 @@
* 2017-02-05 JFL Redesigned to override libc's _setargv(). This avoids *
* having to encapsulate the main() routine with one here. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#define _UTF8_SOURCE
#define _CRT_SECURE_NO_WARNINGS /* Avoid depreciation warnings */
#include <stdio.h>
#include "msvclibx.h"
#include "msvcStdio.h"
#ifdef _WIN32
#include <windows.h>
#include <iconv.h> /* For MsvcLibX' codePage global variable */
#include "msvcIconv.h" /* For MsvcLibX' codePage global variable */
/*---------------------------------------------------------------------------*\
* *
......
@echo off
:#*****************************************************************************
:# *
:# Filename: make.bat *
:# *
:# Description: Build DOS and Windows targets *
:# *
:# Notes: Proxy script for %STINCLUDE%\make.bat. *
:# *
:# If any change is needed, put it in %STINCLUDE%\make.bat. *
:# *
:# History: *
:# 2016-10-10 JFL jf.larvoire@hpe.com created this file. *
:# 2016-12-15 JFL Search for the real make.bat in [.|..|../..]\include. *
:# *
:# Copyright 2016 Hewlett Packard Enterprise Development LP *
:# Licensed under the Apache 2.0 license www.apache.org/licenses/LICENSE-2.0 *
:#*****************************************************************************
:# Get the full pathname of the STINCLUDE library directory
if defined STINCLUDE if not exist "%STINCLUDE%\make.bat" set "STINCLUDE=" &:# Allow overriding with another alias name, but ignore invalid overrides
for %%p in (. .. ..\..) do if not defined STINCLUDE if exist %%p\include\make.bat ( :# Default: Search it the current directory, and 2 levels above.
for /f "delims=" %%d in ('"pushd %%p\include & cd & popd"') do SET "STINCLUDE=%%d"
)
if not defined STINCLUDE ( :# Try getting the copy in the master environment
for /f "tokens=3" %%v in ('reg query "HKCU\Environment" /v STINCLUDE 2^>NUL') do set "STINCLUDE=%%v"
)
if not exist %STINCLUDE%\make.bat (
>&2 echo %0 Error: Cannot find SysToolsLib's global C include directory. Please define variable STINCLUDE.
exit /b 1
)
if [%1]==[-d] echo "%STINCLUDE%\make.bat" %*
"%STINCLUDE%\make.bat" %*
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename mb2wpath.c *
* *
......@@ -10,14 +10,14 @@
* History: *
* 2014-07-01 JFL Created this module. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#define _UTF8_SOURCE /* Generate the UTF-8 version of printf routines */
#include "msvclibx.h"
#include "debugm.h"
#include "msvcDebugm.h"
#if defined(_WIN32)
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename mkdir.c *
* *
......@@ -11,7 +11,7 @@
* 2014-03-24 JFL Renamed "statx.h" as the standard <sys/stat.h>. *
* 2014-07-02 JFL Added support for pathnames >= 260 characters. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -22,8 +22,9 @@
#include <direct.h> /* For _mkdir() */
#include <errno.h>
/* MsvcLibX library extensions */
#include <sys/stat.h>
#include <sys/msvcStat.h>
#include "msvclibx.h"
#include "msvcLimits.h"
#ifdef _WIN32
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename mkdtemp.c *
* *
......@@ -9,15 +9,15 @@
* History: *
* 2014-02-13 JFL Created this module. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
#include "msvcUnistd.h"
char *mkdtemp(char *pszName) {
char *pszXXX, *pc;
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename mkstemp.c *
* *
......@@ -9,13 +9,13 @@
* History: *
* 2014-03-03 JFL Created this module. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#define _CRT_SECURE_NO_WARNINGS 1 /* Avoid Visual C++ security warnings */
#include <unistd.h>
#include "msvcUnistd.h"
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename open.c *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2017-02-16 JFL Created this module. *
* *
* Copyright 2017 Hewlett Packard Enterprise Development LP *
* Copyright 2017 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -19,8 +19,9 @@
#include <errno.h>
#include "msvclibx.h"
#include "fcntl.h"
#include "debugm.h"
#include "msvcFcntl.h"
#include "msvcDebugm.h"
#include "msvcLimits.h"
#ifdef _WIN32
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename readlink.c *
* *
......@@ -19,7 +19,7 @@
* 2014-07-03 JFL Added support for pathnames >= 260 characters. *
* 2016-09-09 JFL Fixed a crash in debug mode, due to stack overflows. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -27,16 +27,17 @@
#define _UTF8_SOURCE /* Generate the UTF-8 version of routines */
#include <unistd.h>
#include "msvcUnistd.h"
#pragma comment(lib, "Mpr.lib")
#include <errno.h>
#include "debugm.h"
#include "msvcDebugm.h"
#include "msvcLimits.h"
#ifdef _WIN32
#include <windows.h>
#include "reparsept.h"
#include "msvcReparsept.h"
/* Get the Reparse Point Tag for a mount point - Wide char version */
/* See http://msdn.microsoft.com/en-us/library/windows/desktop/aa365511(v=vs.85).aspx */
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename realpath.c *
* *
......@@ -23,7 +23,7 @@
* Convert short WIN32 paths to long paths. *
* 2016-09-13 JFL Resize output buffers, to avoid wasting lots of memory. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -31,13 +31,15 @@
#define _UTF8_SOURCE /* Generate the UTF-8 version of routines */
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <direct.h> /* For _getdcwd() */
#include <ctype.h> /* For toupper() */
#include "debugm.h"
#include "msvcDebugm.h"
#include "msvcLimits.h"
#include "msvcUnistd.h"
#include "msvcWindows.h"
#define TRUE 1
#define FALSE 0
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename spawn.c *
* *
......@@ -10,7 +10,7 @@
* 2014-03-27 JFL Created this module. *
* 2014-07-03 JFL Added support for pathnames >= 260 characters. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -19,8 +19,9 @@
/* Microsoft C libraries include files */
#include <stdio.h>
/* MsvcLibX library extensions */
#include "debugm.h"
#include "msvcDebugm.h"
#include "msvclibx.h"
#include "msvcLimits.h"
#ifdef _WIN32
......
@echo off
:******************************************************************************
:* *
:* Filename: src2objs.bat *
:* *
:* Description: Generate object files names from source files names *
:* *
:* Notes: *
:* *
:* History: *
:* 2010-04-07 JFL Created this batch. *
:* *
:# Copyright 2016 Hewlett Packard Enterprise Development LP *
:# Licensed under the Apache 2.0 license www.apache.org/licenses/LICENSE-2.0 *
:******************************************************************************
setlocal 2>NUL
set ARG0=%0
:# Mechanism for calling subroutines. Done by {call %0 _call_ label [arguments]}.
if .%1.==._call_. shift /2 & goto %2
set CALL=call %0 _call_
set RETURN=goto end
:# Silent return. Used for routines silently called via call :label.
set _RETURN=goto _end
set PUTVARS=call :putvars
:# Set global defaults
setlocal
set OUTFILE=obj\objects.mak
set OUTPATH=obj
set NO_EXEC=0
goto get_args
:help
echo Generate object files names from source files names
echo.
echo Usage: %ARG0% [options] source ...
echo.
echo Options:
echo -?^|-h This help
echo -o {pathname} Output file pathname. Default: %OUTFILE%
echo -X Display object files names, but do not create the output file
goto end
:get_args
if .%1.==.. goto help
if .%1.==.-?. goto help
if .%1.==./?. goto help
if %1==-o shift & goto set_out
if %1==-X shift & goto no_exec
goto go
:set_out
set OUTFILE=%1
:# Split the path. Uses a fake drive @ to prevent prepending the current path on an existing drive.
for %%F in (@:"%OUTFILE%") do (
set "OUTPATH=%%~dpF"
)
:# Remove the head "@:\ and tail \ to the path
set "OUTPATH=%OUTPATH:~4,-1%"
shift
goto get_args
:no_exec
set NO_EXEC=1
goto get_args
:# Check prerequisites
:check
verify other 2>nul
setlocal enableextensions
if errorlevel 1 (
echo>&2 Error: Unable to enable command extensions.
exit /b 1
)
set VAR=before
if "%VAR%" == "before" (
set VAR=after
if not "!VAR!" == "after" (
echo>&2 Error: Delayed environment variable expansion must be enabled.
echo>&2 Please restart your cmd.exe shell with the /V option,
echo>&2 or set HKLM\Software\Microsoft\Command Processor\DelayedExpansion=1
exit /b 1
)
)
%_RETURN%
:go
%CALL% check
if errorlevel 1 exit /b 1
set OBJECTS=
:next
if .%1.==.. goto done
for %%s in (%1) do (
set EXT=%%~xs
set OBJ=
if .!EXT!.==..c. set OBJ=obj
if .!EXT!.==..C. set OBJ=obj
if .!EXT!.==..cpp. set OBJ=obj
if .!EXT!.==..CPP. set OBJ=obj
if .!EXT!.==..asm. set OBJ=obj
if .!EXT!.==..ASM. set OBJ=obj
if .!EXT!.==..rc. set OBJ=res
if .!EXT!.==..RC. set OBJ=res
if .!OBJ!.==.. (
echo>&2 Error: Unsupported source type: !EXT!
echo>&2 Please add a conversion rule in %ARG0%
) else (
if .!OBJECTS!.==.. (
set OBJECTS=%OUTPATH%\%%~ns.!OBJ!
) else (
set OBJECTS=!OBJECTS! %OUTPATH%\%%~ns.!OBJ!
)
)
)
shift
goto next
:done
echo OBJECTS=%OBJECTS%
if %NO_EXEC%==0 echo>%OUTFILE% OBJECTS=%OBJECTS%
:end
:_end
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename strerror.c *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-03-06 JFL Created this module. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename strndup.c *
* *
......@@ -9,7 +9,7 @@
* History: *
* 2014-02-13 JFL Created this module. *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename strptime.c *
* *
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename symlink.c *
* *
......@@ -19,7 +19,7 @@
* do not support symlinks. *
* 2016-08-25 JFL Fixed two warnings. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -27,17 +27,18 @@
#define _UTF8_SOURCE /* Generate the UTF-8 version of routines */
#include <unistd.h>
#include "msvcUnistd.h"
#pragma comment(lib, "Mpr.lib")
#include <errno.h>
#include "debugm.h"
#include "msvcDebugm.h"
#include "msvcLimits.h"
#ifdef _WIN32
#include <windows.h>
#include "reparsept.h"
#include "msvcReparsept.h"
/*---------------------------------------------------------------------------*\
* *
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename: uname.c *
* *
......@@ -17,11 +17,11 @@
* History: *
* 2014-05-30 JFL Created this file. *
* *
* © Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
#include "sys/utsname.h"
#include "sys/msvcTsname.h"
#include <stdlib.h> /* For itoa() */
static char major[4] = {0};
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename utime.c *
* *
......@@ -13,7 +13,7 @@
* 2014-07-02 JFL Added support for pathnames >= 260 characters. *
* 2016-08-25 JFL Added missing routine utimeA(). *
* *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -22,10 +22,10 @@
#define _CRT_SECURE_NO_WARNINGS 1 /* Avoid Visual C++ security warnings */
#include <errno.h>
#include <sys/time.h> /* Must be included before any direct or indirect <windows.h> inclusion */
#include <utime.h>
#include "debugm.h"
#include "sys/msvcTime.h" /* Must be included before any direct or indirect <windows.h> inclusion */
#include "msvcUtime.h"
#include "msvcDebugm.h"
#include "msvcLimits.h"
#if defined(_DEBUG)
#include <stdio.h>
......@@ -35,7 +35,7 @@
#include <windows.h>
#include <io.h> /* For MSVC's _get_osfhandle() */
#include <unistd.h> /* For MsvcLibX's ResolveLinks() */
#include "msvcUnistd.h" /* For MsvcLibX's ResolveLinks() */
/* Convert a Windows FILETIME to a Unix time_t.
A FILETIME is the number of 100-nanosecond intervals since January 1, 1601.
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename utimes.c *
* *
......@@ -14,7 +14,7 @@
* 2014-06-04 JFL Added handling of UTIME_NOW and UTIME_OMIT. *
* 2014-07-02 JFL Added support for pathnames >= 260 characters. *
* *
* ?Copyright 2016 Hewlett Packard Enterprise Development LP *
* Copyright 2016 Hewlett Packard Enterprise Development LP *
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/
......@@ -23,10 +23,10 @@
#define _CRT_SECURE_NO_WARNINGS 1 /* Avoid Visual C++ security warnings */
#include <errno.h>
#include <sys/time.h> /* Must be included before any direct or indirect <windows.h> inclusion */
#include <sys/stat.h>
#include "debugm.h"
#include "sys/msvcTime.h" /* Must be included before any direct or indirect <windows.h> inclusion */
#include "sys/msvcStat.h"
#include "msvcDebugm.h"
#include "msvcLimits.h"
#if defined(_DEBUG)
#include <stdio.h>
......@@ -36,7 +36,7 @@
#include <windows.h>
#include <io.h> /* For MSVC's _get_osfhandle() */
#include <unistd.h> /* For MsvcLibX's ResolveLinks() */
#include "msvcUnistd.h" /* For MsvcLibX's ResolveLinks() */
DEBUG_CODE(
int Timeval2String(char *buf, size_t bufsize, const struct timeval *tvp) {
......@@ -64,7 +64,7 @@ void Filetime2Timeval(const FILETIME *pFT, struct timeval *ptv) {
ULARGE_INTEGER ull;
ull.LowPart = pFT->dwLowDateTime;
ull.HighPart = pFT->dwHighDateTime;
ptv->tv_sec = ull.QuadPart / 10000000ULL - 11644473600ULL;
ptv->tv_sec = (long)(ull.QuadPart / 10000000ULL - 11644473600ULL);
ptv->tv_usec = (int32_t)((ull.QuadPart % 10000000ULL)/10);
}
......
/*****************************************************************************\
/*****************************************************************************\
* *
* Filename xfreopen.c *
* *
......@@ -18,7 +18,7 @@
#include <io.h>
#include <fcntl.h>
#include <string.h>
#include "xfreopen.h"
#include "msvcXfreopen.h"
FILE *xfreopen(const char *filename, const char *mode, FILE *stream) {
int iMode = 0;
......
......@@ -360,7 +360,7 @@ find_shared_library_fullname ()
ungetc (c, fp);
shared_library_fullname = NULL; size = 0;
len = getline (&shared_library_fullname, &size, fp);
len = getline(&shared_library_fullname, &size, fp);
if (len >= 0)
{
/* Success: filled shared_library_fullname. */
......
......@@ -228,6 +228,8 @@ typedef unsigned long ULONG_PTR;
#include "config.h"
#endif /* HAVE_PTW32_CONFIG_H */
#include "msvcTime.h"
#if !defined(NEED_FTIME)
#include <time.h>
#else /* NEED_FTIME */
......
......@@ -100,18 +100,19 @@
#endif
#endif /* PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX */
#if (defined(__MINGW64__) || defined(__MINGW32__)) || defined(_UWIN)
# if PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX
/* For pid_t */
# include <sys/types.h>
/* Required by Unix 98 */
# include <time.h>
# else
typedef int pid_t;
# endif
#else
typedef int pid_t;
#endif
// #if (defined(__MINGW64__) || defined(__MINGW32__)) || defined(_UWIN)
// # if PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX
// /* For pid_t */
// # include <sys/types.h>
// /* Required by Unix 98 */
// # include <time.h>
// # else
// typedef int pid_t;
// # endif
// #else
// typedef int pid_t;
// #endif
#include <sys/msvcTypes.h>
/* Thread scheduling policies */
......
......@@ -99,6 +99,8 @@
#endif
#endif /* PTW32_SEMAPHORE_LEVEL >= PTW32_SEMAPHORE_LEVEL_MAX */
#include "sys/msvcTypes.h"
#define _POSIX_SEMAPHORES
#if defined(__cplusplus)
......
......@@ -157,7 +157,7 @@ TDengine缺省的时间戳是毫秒精度,但通过修改配置参数enableMic
```mysql
DROP TABLE [IF EXISTS] stb_name;
```
删除STable会自动删除通过STable创建的表。
删除STable会自动删除通过STable创建的表。
- **显示当前数据库下的所有超级表信息**
......@@ -206,7 +206,7 @@ TDengine缺省的时间戳是毫秒精度,但通过修改配置参数enableMic
```
修改超级表的标签名,从超级表修改某个标签名后,该超级表下的所有子表也会自动更新该标签名。
- **修改表标签值**
- **修改表标签值**
```mysql
ALTER TABLE tb_name SET TAG tag_name=new_tag_value;
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册