Updated webio

This commit is contained in:
Bazsalanszky 2019-10-19 01:00:01 +02:00
parent 95ccba1350
commit 0f3761d6d0
Signed by: Bazsalanszky
GPG key ID: 214701A3BD4B06F2
46 changed files with 3483 additions and 7 deletions

1
.idea/.name Normal file
View file

@ -0,0 +1 @@
p2p

200
build/ALL_BUILD.vcxproj Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<CustomBuild Include="C:\msys64\home\Balazs\p2p-chat\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
</Project>

304
build/CMakeCache.txt Normal file
View file

@ -0,0 +1,304 @@
# This is the CMakeCache file.
# For build in directory: c:/msys64/home/Balazs/p2p-chat/build
# It was generated by CMake: C:/msys64/mingw64/bin/cmake.exe
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//Semicolon separated list of supported configuration types, only
// supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything
// else will be ignored.
CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo
//Flags used by the C compiler during all build types.
CMAKE_C_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3
//Flags used by the C compiler during DEBUG builds.
CMAKE_C_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1
//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG
//Flags used by the C compiler during RELEASE builds.
CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG
//Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG
//Libraries linked by default with all C applications.
CMAKE_C_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
//Flags used by the linker during all build types.
CMAKE_EXE_LINKER_FLAGS:STRING=/machine:x64
//Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL
//Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
//Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
//Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/p2p
//Path to a program.
CMAKE_LINKER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/link.exe
//Flags used by the linker during the creation of modules during
// all build types.
CMAKE_MODULE_LINKER_FLAGS:STRING=/machine:x64
//Flags used by the linker during the creation of modules during
// DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL
//Flags used by the linker during the creation of modules during
// MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
//Flags used by the linker during the creation of modules during
// RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
//Flags used by the linker during the creation of modules during
// RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL
//Path to a program.
CMAKE_MT:FILEPATH=CMAKE_MT-NOTFOUND
//Value Computed by CMake
CMAKE_PROJECT_DESCRIPTION:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=p2p
//RC compiler
CMAKE_RC_COMPILER:FILEPATH=rc
//Flags for Windows Resource Compiler during all build types.
CMAKE_RC_FLAGS:STRING=-DWIN32
//Flags for Windows Resource Compiler during DEBUG builds.
CMAKE_RC_FLAGS_DEBUG:STRING=-D_DEBUG
//Flags for Windows Resource Compiler during MINSIZEREL builds.
CMAKE_RC_FLAGS_MINSIZEREL:STRING=
//Flags for Windows Resource Compiler during RELEASE builds.
CMAKE_RC_FLAGS_RELEASE:STRING=
//Flags for Windows Resource Compiler during RELWITHDEBINFO builds.
CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=
//Flags used by the linker during the creation of shared libraries
// during all build types.
CMAKE_SHARED_LINKER_FLAGS:STRING=/machine:x64
//Flags used by the linker during the creation of shared libraries
// during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL
//Flags used by the linker during the creation of shared libraries
// during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
//Flags used by the linker during the creation of shared libraries
// during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
//Flags used by the linker during the creation of shared libraries
// during RELWITHDEBINFO builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL
//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO
//Flags used by the linker during the creation of static libraries
// during all build types.
CMAKE_STATIC_LINKER_FLAGS:STRING=/machine:x64
//Flags used by the linker during the creation of static libraries
// during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of static libraries
// during MINSIZEREL builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of static libraries
// during RELEASE builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of static libraries
// during RELWITHDEBINFO builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make. This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
//Path to a library.
LIB_EAY_DEBUG:FILEPATH=C:/OpenSSL-Win64/lib/VC/libcrypto64MDd.lib
//Path to a library.
LIB_EAY_RELEASE:FILEPATH=C:/OpenSSL-Win64/lib/VC/libcrypto64MD.lib
//Path to a file.
OPENSSL_INCLUDE_DIR:PATH=C:/OpenSSL-Win64/include
//Path to a library.
SSL_EAY_DEBUG:FILEPATH=C:/OpenSSL-Win64/lib/VC/libssl64MDd.lib
//Path to a library.
SSL_EAY_RELEASE:FILEPATH=C:/OpenSSL-Win64/lib/VC/libssl64MD.lib
//Value Computed by CMake
p2p_BINARY_DIR:STATIC=C:/msys64/home/Balazs/p2p-chat/build
//Value Computed by CMake
p2p_SOURCE_DIR:STATIC=C:/msys64/home/Balazs/p2p-chat
########################
# INTERNAL cache entries
########################
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=c:/msys64/home/Balazs/p2p-chat/build
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=15
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=2
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=C:/msys64/mingw64/bin/cmake.exe
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=C:/msys64/mingw64/bin/cpack.exe
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=C:/msys64/mingw64/bin/ctest.exe
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES
CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
//Executable file format
CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Visual Studio 16 2019
//Generator instance identifier.
CMAKE_GENERATOR_INSTANCE:INTERNAL=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=C:/msys64/home/Balazs/p2p-chat
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MT
CMAKE_MT-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
//Platform information initialized
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_COMPILER
CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1
CMAKE_RC_COMPILER_WORKS:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS
CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG
CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL
CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE
CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO
CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=C:/msys64/mingw64/share/cmake-3.15
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//Details about finding OpenSSL
FIND_PACKAGE_MESSAGE_DETAILS_OpenSSL:INTERNAL=[optimized;C:/OpenSSL-Win64/lib/VC/libcrypto64MD.lib;debug;C:/OpenSSL-Win64/lib/VC/libcrypto64MDd.lib][C:/OpenSSL-Win64/include][c ][v1.1.0l()]
//ADVANCED property for variable: OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR-ADVANCED:INTERNAL=1

View file

@ -0,0 +1,76 @@
set(CMAKE_C_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe")
set(CMAKE_C_COMPILER_ARG1 "")
set(CMAKE_C_COMPILER_ID "MSVC")
set(CMAKE_C_COMPILER_VERSION "19.22.27905.0")
set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
set(CMAKE_C_COMPILER_WRAPPER "")
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "90")
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_std_99;c_std_11;c_function_prototypes;c_variadic_macros")
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_variadic_macros")
set(CMAKE_C11_COMPILE_FEATURES "c_std_11")
set(CMAKE_C_PLATFORM_ID "Windows")
set(CMAKE_C_SIMULATE_ID "")
set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
set(CMAKE_C_SIMULATE_VERSION "")
set(CMAKE_C_COMPILER_ARCHITECTURE_ID x64)
set(MSVC_C_ARCHITECTURE_ID x64)
set(CMAKE_AR "")
set(CMAKE_C_COMPILER_AR "")
set(CMAKE_RANLIB "")
set(CMAKE_C_COMPILER_RANLIB "")
set(CMAKE_LINKER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/link.exe")
set(CMAKE_MT "CMAKE_MT-NOTFOUND")
set(CMAKE_COMPILER_IS_GNUCC )
set(CMAKE_C_COMPILER_LOADED 1)
set(CMAKE_C_COMPILER_WORKS TRUE)
set(CMAKE_C_ABI_COMPILED TRUE)
set(CMAKE_COMPILER_IS_MINGW )
set(CMAKE_COMPILER_IS_CYGWIN )
if(CMAKE_COMPILER_IS_CYGWIN)
set(CYGWIN 1)
set(UNIX 1)
endif()
set(CMAKE_C_COMPILER_ENV_VAR "CC")
if(CMAKE_COMPILER_IS_MINGW)
set(MINGW 1)
endif()
set(CMAKE_C_COMPILER_ID_RUN 1)
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
set(CMAKE_C_SIZEOF_DATA_PTR "8")
set(CMAKE_C_COMPILER_ABI "")
set(CMAKE_C_LIBRARY_ARCHITECTURE "")
if(CMAKE_C_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
endif()
if(CMAKE_C_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
endif()
if(CMAKE_C_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "")
endif()
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
endif()
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "")
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "")
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

View file

@ -0,0 +1,6 @@
set(CMAKE_RC_COMPILER "rc")
set(CMAKE_RC_COMPILER_ARG1 "")
set(CMAKE_RC_COMPILER_LOADED 1)
set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC)
set(CMAKE_RC_OUTPUT_EXTENSION .res)
set(CMAKE_RC_COMPILER_ENV_VAR "RC")

View file

@ -0,0 +1,15 @@
set(CMAKE_HOST_SYSTEM "Windows-10.0.18956")
set(CMAKE_HOST_SYSTEM_NAME "Windows")
set(CMAKE_HOST_SYSTEM_VERSION "10.0.18956")
set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
set(CMAKE_SYSTEM "Windows-10.0.18956")
set(CMAKE_SYSTEM_NAME "Windows")
set(CMAKE_SYSTEM_VERSION "10.0.18956")
set(CMAKE_SYSTEM_PROCESSOR "AMD64")
set(CMAKE_CROSSCOMPILING "FALSE")
set(CMAKE_SYSTEM_LOADED 1)

View file

@ -0,0 +1,665 @@
#ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
#if defined(__CLASSIC_C__)
/* cv-qualifiers did not exist in K&R C */
# define const
# define volatile
#endif
/* Version number components: V=Version, R=Revision, P=Patch
Version date components: YYYY=Year, MM=Month, DD=Day */
#if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# if defined(__GNUC__)
# define SIMULATE_ID "GNU"
# endif
/* __INTEL_COMPILER = VRP */
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
# if defined(__INTEL_COMPILER_UPDATE)
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
# else
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
# endif
# if defined(__INTEL_COMPILER_BUILD_DATE)
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
# endif
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# if defined(__GNUC__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
# elif defined(__GNUG__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
# endif
# if defined(__GNUC_MINOR__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif defined(__PATHCC__)
# define COMPILER_ID "PathScale"
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
# if defined(__PATHCC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
# endif
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
# define COMPILER_ID "Embarcadero"
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
/* __BORLANDC__ = 0xVRR */
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
# define COMPILER_ID "Watcom"
/* __WATCOMC__ = VVRR */
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__WATCOMC__)
# define COMPILER_ID "OpenWatcom"
/* __WATCOMC__ = VVRP + 1100 */
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__SUNPRO_C)
# define COMPILER_ID "SunPro"
# if __SUNPRO_C >= 0x5100
/* __SUNPRO_C = 0xVRRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
# else
/* __SUNPRO_CC = 0xVRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
# endif
#elif defined(__HP_cc)
# define COMPILER_ID "HP"
/* __HP_cc = VVRRPP */
# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
#elif defined(__DECC)
# define COMPILER_ID "Compaq"
/* __DECC_VER = VVRRTPPPP */
# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
#elif defined(__IBMC__) && defined(__COMPILER_VER__)
# define COMPILER_ID "zOS"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__ibmxl__) && defined(__clang__)
# define COMPILER_ID "XLClang"
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
# define COMPILER_ID "XL"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
# define COMPILER_ID "VisualAge"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__PGI)
# define COMPILER_ID "PGI"
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
# if defined(__PGIC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
# endif
#elif defined(_CRAYC)
# define COMPILER_ID "Cray"
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
#elif defined(__TI_COMPILER_VERSION__)
# define COMPILER_ID "TI"
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
# define COMPILER_ID "Fujitsu"
#elif defined(__ghs__)
# define COMPILER_ID "GHS"
/* __GHS_VERSION_NUMBER = VVVVRP */
# ifdef __GHS_VERSION_NUMBER
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
# endif
#elif defined(__TINYC__)
# define COMPILER_ID "TinyCC"
#elif defined(__BCC__)
# define COMPILER_ID "Bruce"
#elif defined(__SCO_VERSION__)
# define COMPILER_ID "SCO"
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
# define COMPILER_ID "ARMCC"
#if __ARMCC_VERSION >= 1000000
/* __ARMCC_VERSION = VRRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#else
/* __ARMCC_VERSION = VRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#endif
#elif defined(__clang__) && defined(__apple_build_version__)
# define COMPILER_ID "AppleClang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
# define COMPILER_ID "ARMClang"
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
#elif defined(__clang__)
# define COMPILER_ID "Clang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
# if defined(__GNUC_MINOR__)
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif defined(_MSC_VER)
# define COMPILER_ID "MSVC"
/* _MSC_VER = VVRR */
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
# if defined(_MSC_FULL_VER)
# if _MSC_VER >= 1400
/* _MSC_FULL_VER = VVRRPPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
# else
/* _MSC_FULL_VER = VVRRPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
# endif
# endif
# if defined(_MSC_BUILD)
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
# endif
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
# define COMPILER_ID "ADSP"
#if defined(__VISUALDSPVERSION__)
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
#endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# define COMPILER_ID "IAR"
# if defined(__VER__) && defined(__ICCARM__)
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__))
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# endif
#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
# define COMPILER_ID "SDCC"
# if defined(__SDCC_VERSION_MAJOR)
# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
# else
/* SDCC = VRP */
# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
# endif
/* These compilers are either not known or too old to define an
identification macro. Try to identify the platform and guess that
it is the native compiler. */
#elif defined(__hpux) || defined(__hpua)
# define COMPILER_ID "HP"
#else /* unknown compiler */
# define COMPILER_ID ""
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
#ifdef SIMULATE_ID
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
#endif
#ifdef __QNXNTO__
char const* qnxnto = "INFO" ":" "qnxnto[]";
#endif
#if defined(__CRAYXE) || defined(__CRAYXC)
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
#endif
#define STRINGIFY_HELPER(X) #X
#define STRINGIFY(X) STRINGIFY_HELPER(X)
/* Identify known platforms by name. */
#if defined(__linux) || defined(__linux__) || defined(linux)
# define PLATFORM_ID "Linux"
#elif defined(__CYGWIN__)
# define PLATFORM_ID "Cygwin"
#elif defined(__MINGW32__)
# define PLATFORM_ID "MinGW"
#elif defined(__APPLE__)
# define PLATFORM_ID "Darwin"
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
# define PLATFORM_ID "Windows"
#elif defined(__FreeBSD__) || defined(__FreeBSD)
# define PLATFORM_ID "FreeBSD"
#elif defined(__NetBSD__) || defined(__NetBSD)
# define PLATFORM_ID "NetBSD"
#elif defined(__OpenBSD__) || defined(__OPENBSD)
# define PLATFORM_ID "OpenBSD"
#elif defined(__sun) || defined(sun)
# define PLATFORM_ID "SunOS"
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
# define PLATFORM_ID "AIX"
#elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX"
#elif defined(__HAIKU__)
# define PLATFORM_ID "Haiku"
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS"
#elif defined(__QNX__) || defined(__QNXNTO__)
# define PLATFORM_ID "QNX"
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
# define PLATFORM_ID "Tru64"
#elif defined(__riscos) || defined(__riscos__)
# define PLATFORM_ID "RISCos"
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
# define PLATFORM_ID "SINIX"
#elif defined(__UNIX_SV__)
# define PLATFORM_ID "UNIX_SV"
#elif defined(__bsdos__)
# define PLATFORM_ID "BSDOS"
#elif defined(_MPRAS) || defined(MPRAS)
# define PLATFORM_ID "MP-RAS"
#elif defined(__osf) || defined(__osf__)
# define PLATFORM_ID "OSF1"
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
# define PLATFORM_ID "SCO_SV"
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
# define PLATFORM_ID "ULTRIX"
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
# define PLATFORM_ID "Xenix"
#elif defined(__WATCOMC__)
# if defined(__LINUX__)
# define PLATFORM_ID "Linux"
# elif defined(__DOS__)
# define PLATFORM_ID "DOS"
# elif defined(__OS2__)
# define PLATFORM_ID "OS2"
# elif defined(__WINDOWS__)
# define PLATFORM_ID "Windows3x"
# else /* unknown platform */
# define PLATFORM_ID
# endif
#elif defined(__INTEGRITY)
# if defined(INT_178B)
# define PLATFORM_ID "Integrity178"
# else /* regular Integrity */
# define PLATFORM_ID "Integrity"
# endif
#else /* unknown platform */
# define PLATFORM_ID
#endif
/* For windows compilers MSVC and Intel we can determine
the architecture of the compiler being used. This is because
the compilers do not have flags that can change the architecture,
but rather depend on which compiler is being used
*/
#if defined(_WIN32) && defined(_MSC_VER)
# if defined(_M_IA64)
# define ARCHITECTURE_ID "IA64"
# elif defined(_M_X64) || defined(_M_AMD64)
# define ARCHITECTURE_ID "x64"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# elif defined(_M_ARM64)
# define ARCHITECTURE_ID "ARM64"
# elif defined(_M_ARM)
# if _M_ARM == 4
# define ARCHITECTURE_ID "ARMV4I"
# elif _M_ARM == 5
# define ARCHITECTURE_ID "ARMV5I"
# else
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
# endif
# elif defined(_M_MIPS)
# define ARCHITECTURE_ID "MIPS"
# elif defined(_M_SH)
# define ARCHITECTURE_ID "SHx"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__WATCOMC__)
# if defined(_M_I86)
# define ARCHITECTURE_ID "I86"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# if defined(__ICCARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__ICCRX__)
# define ARCHITECTURE_ID "RX"
# elif defined(__ICCRH850__)
# define ARCHITECTURE_ID "RH850"
# elif defined(__ICCRL78__)
# define ARCHITECTURE_ID "RL78"
# elif defined(__ICCRISCV__)
# define ARCHITECTURE_ID "RISCV"
# elif defined(__ICCAVR__)
# define ARCHITECTURE_ID "AVR"
# elif defined(__ICC430__)
# define ARCHITECTURE_ID "MSP430"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__ghs__)
# if defined(__PPC64__)
# define ARCHITECTURE_ID "PPC64"
# elif defined(__ppc__)
# define ARCHITECTURE_ID "PPC"
# elif defined(__ARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__x86_64__)
# define ARCHITECTURE_ID "x64"
# elif defined(__i386__)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#else
# define ARCHITECTURE_ID
#endif
/* Convert integer to decimal digit literals. */
#define DEC(n) \
('0' + (((n) / 10000000)%10)), \
('0' + (((n) / 1000000)%10)), \
('0' + (((n) / 100000)%10)), \
('0' + (((n) / 10000)%10)), \
('0' + (((n) / 1000)%10)), \
('0' + (((n) / 100)%10)), \
('0' + (((n) / 10)%10)), \
('0' + ((n) % 10))
/* Convert integer to hex digit literals. */
#define HEX(n) \
('0' + ((n)>>28 & 0xF)), \
('0' + ((n)>>24 & 0xF)), \
('0' + ((n)>>20 & 0xF)), \
('0' + ((n)>>16 & 0xF)), \
('0' + ((n)>>12 & 0xF)), \
('0' + ((n)>>8 & 0xF)), \
('0' + ((n)>>4 & 0xF)), \
('0' + ((n) & 0xF))
/* Construct a string literal encoding the version number components. */
#ifdef COMPILER_VERSION_MAJOR
char const info_version[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
COMPILER_VERSION_MAJOR,
# ifdef COMPILER_VERSION_MINOR
'.', COMPILER_VERSION_MINOR,
# ifdef COMPILER_VERSION_PATCH
'.', COMPILER_VERSION_PATCH,
# ifdef COMPILER_VERSION_TWEAK
'.', COMPILER_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct a string literal encoding the internal version number. */
#ifdef COMPILER_VERSION_INTERNAL
char const info_version_internal[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
'i','n','t','e','r','n','a','l','[',
COMPILER_VERSION_INTERNAL,']','\0'};
#endif
/* Construct a string literal encoding the version number components. */
#ifdef SIMULATE_VERSION_MAJOR
char const info_simulate_version[] = {
'I', 'N', 'F', 'O', ':',
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
SIMULATE_VERSION_MAJOR,
# ifdef SIMULATE_VERSION_MINOR
'.', SIMULATE_VERSION_MINOR,
# ifdef SIMULATE_VERSION_PATCH
'.', SIMULATE_VERSION_PATCH,
# ifdef SIMULATE_VERSION_TWEAK
'.', SIMULATE_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
#if !defined(__STDC__)
# if (defined(_MSC_VER) && !defined(__clang__)) \
|| (defined(__ibmxl__) || defined(__IBMC__))
# define C_DIALECT "90"
# else
# define C_DIALECT
# endif
#elif __STDC_VERSION__ >= 201000L
# define C_DIALECT "11"
#elif __STDC_VERSION__ >= 199901L
# define C_DIALECT "99"
#else
# define C_DIALECT "90"
#endif
const char* info_language_dialect_default =
"INFO" ":" "dialect_default[" C_DIALECT "]";
/*--------------------------------------------------------------------------*/
#ifdef ID_VOID_MAIN
void main() {}
#else
# if defined(__CLASSIC_C__)
int main(argc, argv) int argc; char *argv[];
# else
int main(int argc, char* argv[])
# endif
{
int require = 0;
require += info_compiler[argc];
require += info_platform[argc];
require += info_arch[argc];
#ifdef COMPILER_VERSION_MAJOR
require += info_version[argc];
#endif
#ifdef COMPILER_VERSION_INTERNAL
require += info_version_internal[argc];
#endif
#ifdef SIMULATE_ID
require += info_simulate[argc];
#endif
#ifdef SIMULATE_VERSION_MAJOR
require += info_simulate_version[argc];
#endif
#if defined(__CRAYXE) || defined(__CRAYXC)
require += info_cray[argc];
#endif
require += info_language_dialect_default[argc];
(void)argv;
return require;
}
#endif

Binary file not shown.

View file

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{CAE07175-D007-4FC3-BFE8-47B392814159}</ProjectGuid>
<RootNamespace>CompilerIdC</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<DebugInformationFormat>
</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Command>for %%i in (cl.exe) do %40echo CMAKE_C_COMPILER=%%~$PATH:i</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CMakeCCompilerId.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View file

@ -0,0 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v142:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native64Bit:WindowsTargetPlatformVersion=10.0.18362.0
Debug|x64|C:\msys64\home\Balazs\p2p-chat\build\CMakeFiles\3.15.2\CompilerIdC\|

View file

@ -0,0 +1 @@
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Microsoft/VC/v160

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F3FC6D86-508D-3FB1-96D2-995F08B142EC}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<Platform>x64</Platform>
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
<ItemDefinitionGroup>
<PostBuildEvent>
<Command>echo VCTargetsPath=$(VCTargetsPath)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
</Project>

View file

@ -0,0 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v142:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native64Bit:WindowsTargetPlatformVersion=10.0.18362.0
Debug|x64|C:\msys64\home\Balazs\p2p-chat\build\CMakeFiles\3.15.2\|

View file

@ -0,0 +1 @@
# generated from CMake

View file

@ -0,0 +1,74 @@
The system is: Windows - 10.0.18956 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler:
Build flags:
Id flags:
The output was:
0
Microsoft (R) Build Engine version 16.2.37902+b5aaefc9f for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2019. 10. 18. 9:33:33 PM.
Project "C:\msys64\home\Balazs\p2p-chat\build\CMakeFiles\3.15.2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc142.pdb" /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
CompilerIdC.vcxproj -> C:\msys64\home\Balazs\p2p-chat\build\CMakeFiles\3.15.2\CompilerIdC\.\CompilerIdC.exe
PostBuildEvent:
for %%i in (cl.exe) do @echo CMAKE_C_COMPILER=%%~$PATH:i
:VCEnd
CMAKE_C_COMPILER=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\Hostx64\x64\cl.exe
FinalizeBuildStatus:
Deleting file "Debug\CompilerIdC.tlog\unsuccessfulbuild".
Touching "Debug\CompilerIdC.tlog\CompilerIdC.lastbuildstate".
Done Building Project "C:\msys64\home\Balazs\p2p-chat\build\CMakeFiles\3.15.2\CompilerIdC\CompilerIdC.vcxproj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.13
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.exe"
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.vcxproj"
The C compiler identification is MSVC, found in "C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/3.15.2/CompilerIdC/CompilerIdC.exe"
Determining if the C compiler works passed with the following output:
Change Dir: C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_abe57.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.2.37902+b5aaefc9f for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft (R) C/C++ Optimizing Compiler Version 19.22.27905 for x64
testCCompiler.c
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_abe57.dir\Debug\\" /Fd"cmTC_abe57.dir\Debug\vc142.pdb" /Gd /TC /errorReport:queue "C:\msys64\home\Balazs\p2p-chat\build\CMakeFiles\CMakeTmp\testCCompiler.c"
cmTC_abe57.vcxproj -> C:\msys64\home\Balazs\p2p-chat\build\CMakeFiles\CMakeTmp\Debug\cmTC_abe57.exe
Detecting C compiler ABI info compiled with the following output:
Change Dir: C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_fc3df.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.2.37902+b5aaefc9f for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft (R) C/C++ Optimizing Compiler Version 19.22.27905 for x64
CMakeCCompilerABI.c
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_fc3df.dir\Debug\\" /Fd"cmTC_fc3df.dir\Debug\vc142.pdb" /Gd /TC /errorReport:queue "C:\msys64\mingw64\share\cmake-3.15\Modules\CMakeCCompilerABI.c"
cmTC_fc3df.vcxproj -> C:\msys64\home\Balazs\p2p-chat\build\CMakeFiles\CMakeTmp\Debug\cmTC_fc3df.exe

View file

@ -0,0 +1,6 @@
C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/test.dir
C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/p2p-3.dir
C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/p2p.dir
C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/p2p-2.dir
C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/ALL_BUILD.dir
C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/ZERO_CHECK.dir

View file

@ -0,0 +1 @@
# This file is generated by cmake for dependency checking of the CMakeCache.txt file

View file

@ -0,0 +1 @@
# CMake generation timestamp file for this directory.

View file

@ -0,0 +1,75 @@
# CMake generation dependency list for this directory.
C:/msys64/home/Balazs/p2p-chat/CMakeLists.txt
C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/3.15.2/CMakeCCompiler.cmake
C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/3.15.2/CMakeRCCompiler.cmake
C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/3.15.2/CMakeSystem.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeCCompiler.cmake.in
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeCCompilerABI.c
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeCInformation.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeCommonLanguageInclude.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeCompilerIdDetection.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeDetermineCCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeDetermineCompileFeatures.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeDetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeDetermineCompilerABI.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeDetermineRCCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeDetermineSystem.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeFindBinUtils.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeGenericSystem.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeInitializeConfigs.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeLanguageInformation.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeParseImplicitIncludeInfo.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeParseImplicitLinkInfo.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeRCCompiler.cmake.in
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeRCInformation.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeSystem.cmake.in
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeSystemSpecificInformation.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeSystemSpecificInitialize.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeTestCompilerCommon.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeTestRCCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/ADSP-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/ARMCC-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/ARMClang-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/AppleClang-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/Borland-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/Bruce-C-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/Clang-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/Clang-DetermineCompilerInternal.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/Compaq-C-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/Cray-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/Embarcadero-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/Fujitsu-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/GHS-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/GNU-C-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/HP-C-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/IAR-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/Intel-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/MSVC-C.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/MSVC-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/NVIDIA-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/PGI-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/PathScale-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/SCO-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/SDCC-C-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/SunPro-C-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/TI-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/Watcom-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/XL-C-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/XLClang-C-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Compiler/zOS-C-DetermineCompiler.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/CompilerId/VS-10.vcxproj.in
C:/msys64/mingw64/share/cmake-3.15/Modules/FindOpenSSL.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/FindPackageMessage.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Internal/FeatureTesting.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Platform/Windows-MSVC-C.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Platform/Windows-MSVC.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Platform/Windows.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/Platform/WindowsPaths.cmake
C:/msys64/mingw64/share/cmake-3.15/Modules/SelectLibraryConfigurations.cmake

View file

@ -0,0 +1 @@
C:/msys64/home/Balazs/p2p-chat/build/CMakeFiles/generate.stamp

170
build/ZERO_CHECK.vcxproj Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<CustomBuild Include="C:\msys64\home\Balazs\p2p-chat\build\CMakeFiles\4732143da68fa630e69886a2ffdf38c8\generate.stamp.rule">
<Filter>CMake Rules</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<Filter Include="CMake Rules">
<UniqueIdentifier>{C5A4AF02-6FDA-340C-B58C-7F31EB6A35F4}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

44
build/cmake_install.cmake Normal file
View file

@ -0,0 +1,44 @@
# Install script for directory: C:/msys64/home/Balazs/p2p-chat
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/p2p")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
if(BUILD_TYPE)
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
else()
set(CMAKE_INSTALL_CONFIG_NAME "Release")
endif()
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()
# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
if(COMPONENT)
message(STATUS "Install component: \"${COMPONENT}\"")
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
else()
set(CMAKE_INSTALL_COMPONENT)
endif()
endif()
# Is this installation the result of a crosscompile?
if(NOT DEFINED CMAKE_CROSSCOMPILING)
set(CMAKE_CROSSCOMPILING "FALSE")
endif()
if(CMAKE_INSTALL_COMPONENT)
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
else()
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
endif()
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
"${CMAKE_INSTALL_MANIFEST_FILES}")
file(WRITE "C:/msys64/home/Balazs/p2p-chat/build/${CMAKE_INSTALL_MANIFEST}"
"${CMAKE_INSTALL_MANIFEST_CONTENT}")

342
build/p2p-2.vcxproj Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\main.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\peer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\utility.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\modules\webio\webio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\modules\config.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\modules\map.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\peer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\utility.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\modules\webio\webio.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\modules\config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\modules\map.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="C:\msys64\home\Balazs\p2p-chat\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{5691324B-D41C-3B91-9D94-E7E8BD1E2B7E}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{97F5A913-7E64-3E52-A02A-F84A81E52DF1}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

342
build/p2p-3.vcxproj Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\main.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\peer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\utility.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\modules\webio\webio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\modules\config.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\modules\map.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\peer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\utility.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\modules\webio\webio.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\modules\config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\modules\map.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="C:\msys64\home\Balazs\p2p-chat\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{5691324B-D41C-3B91-9D94-E7E8BD1E2B7E}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{97F5A913-7E64-3E52-A02A-F84A81E52DF1}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

94
build/p2p.sln Normal file
View file

@ -0,0 +1,94 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 16
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "ALL_BUILD.vcxproj", "{FFC60969-3F2A-3A31-93E1-8E510F159AA1}"
ProjectSection(ProjectDependencies) = postProject
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE} = {5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}
{F7A8F69A-1618-3E70-8A93-C614A8AE8B4B} = {F7A8F69A-1618-3E70-8A93-C614A8AE8B4B}
{872C426F-03D6-3174-9BB9-0194314658DE} = {872C426F-03D6-3174-9BB9-0194314658DE}
{0A581D34-5634-38B7-8CB6-0B4EB0F690B0} = {0A581D34-5634-38B7-8CB6-0B4EB0F690B0}
{22333F3E-FC36-32E1-B9BF-AC2040D5AEC7} = {22333F3E-FC36-32E1-B9BF-AC2040D5AEC7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZERO_CHECK", "ZERO_CHECK.vcxproj", "{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "p2p", "p2p.vcxproj", "{F7A8F69A-1618-3E70-8A93-C614A8AE8B4B}"
ProjectSection(ProjectDependencies) = postProject
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE} = {5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "p2p-2", "p2p-2.vcxproj", "{872C426F-03D6-3174-9BB9-0194314658DE}"
ProjectSection(ProjectDependencies) = postProject
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE} = {5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "p2p-3", "p2p-3.vcxproj", "{0A581D34-5634-38B7-8CB6-0B4EB0F690B0}"
ProjectSection(ProjectDependencies) = postProject
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE} = {5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcxproj", "{22333F3E-FC36-32E1-B9BF-AC2040D5AEC7}"
ProjectSection(ProjectDependencies) = postProject
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE} = {5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
MinSizeRel|x64 = MinSizeRel|x64
RelWithDebInfo|x64 = RelWithDebInfo|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FFC60969-3F2A-3A31-93E1-8E510F159AA1}.Debug|x64.ActiveCfg = Debug|x64
{FFC60969-3F2A-3A31-93E1-8E510F159AA1}.Release|x64.ActiveCfg = Release|x64
{FFC60969-3F2A-3A31-93E1-8E510F159AA1}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{FFC60969-3F2A-3A31-93E1-8E510F159AA1}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}.Debug|x64.ActiveCfg = Debug|x64
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}.Debug|x64.Build.0 = Debug|x64
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}.Release|x64.ActiveCfg = Release|x64
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}.Release|x64.Build.0 = Release|x64
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{5AF6F58A-29A4-3973-96CE-279C9FD0F0FE}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{F7A8F69A-1618-3E70-8A93-C614A8AE8B4B}.Debug|x64.ActiveCfg = Debug|x64
{F7A8F69A-1618-3E70-8A93-C614A8AE8B4B}.Debug|x64.Build.0 = Debug|x64
{F7A8F69A-1618-3E70-8A93-C614A8AE8B4B}.Release|x64.ActiveCfg = Release|x64
{F7A8F69A-1618-3E70-8A93-C614A8AE8B4B}.Release|x64.Build.0 = Release|x64
{F7A8F69A-1618-3E70-8A93-C614A8AE8B4B}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{F7A8F69A-1618-3E70-8A93-C614A8AE8B4B}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{F7A8F69A-1618-3E70-8A93-C614A8AE8B4B}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{F7A8F69A-1618-3E70-8A93-C614A8AE8B4B}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{872C426F-03D6-3174-9BB9-0194314658DE}.Debug|x64.ActiveCfg = Debug|x64
{872C426F-03D6-3174-9BB9-0194314658DE}.Debug|x64.Build.0 = Debug|x64
{872C426F-03D6-3174-9BB9-0194314658DE}.Release|x64.ActiveCfg = Release|x64
{872C426F-03D6-3174-9BB9-0194314658DE}.Release|x64.Build.0 = Release|x64
{872C426F-03D6-3174-9BB9-0194314658DE}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{872C426F-03D6-3174-9BB9-0194314658DE}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{872C426F-03D6-3174-9BB9-0194314658DE}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{872C426F-03D6-3174-9BB9-0194314658DE}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{0A581D34-5634-38B7-8CB6-0B4EB0F690B0}.Debug|x64.ActiveCfg = Debug|x64
{0A581D34-5634-38B7-8CB6-0B4EB0F690B0}.Debug|x64.Build.0 = Debug|x64
{0A581D34-5634-38B7-8CB6-0B4EB0F690B0}.Release|x64.ActiveCfg = Release|x64
{0A581D34-5634-38B7-8CB6-0B4EB0F690B0}.Release|x64.Build.0 = Release|x64
{0A581D34-5634-38B7-8CB6-0B4EB0F690B0}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{0A581D34-5634-38B7-8CB6-0B4EB0F690B0}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{0A581D34-5634-38B7-8CB6-0B4EB0F690B0}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{0A581D34-5634-38B7-8CB6-0B4EB0F690B0}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{22333F3E-FC36-32E1-B9BF-AC2040D5AEC7}.Debug|x64.ActiveCfg = Debug|x64
{22333F3E-FC36-32E1-B9BF-AC2040D5AEC7}.Debug|x64.Build.0 = Debug|x64
{22333F3E-FC36-32E1-B9BF-AC2040D5AEC7}.Release|x64.ActiveCfg = Release|x64
{22333F3E-FC36-32E1-B9BF-AC2040D5AEC7}.Release|x64.Build.0 = Release|x64
{22333F3E-FC36-32E1-B9BF-AC2040D5AEC7}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{22333F3E-FC36-32E1-B9BF-AC2040D5AEC7}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{22333F3E-FC36-32E1-B9BF-AC2040D5AEC7}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{22333F3E-FC36-32E1-B9BF-AC2040D5AEC7}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E9590398-F9B0-3ACC-A70C-1B60D7509219}
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

342
build/p2p.vcxproj Normal file

File diff suppressed because one or more lines are too long

51
build/p2p.vcxproj.filters Normal file
View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\main.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\peer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\utility.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\modules\webio\webio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\modules\config.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\modules\map.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\peer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\utility.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\modules\webio\webio.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\modules\config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\modules\map.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="C:\msys64\home\Balazs\p2p-chat\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{5691324B-D41C-3B91-9D94-E7E8BD1E2B7E}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{97F5A913-7E64-3E52-A02A-F84A81E52DF1}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

336
build/test.vcxproj Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\test.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\utility.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C:\msys64\home\Balazs\p2p-chat\modules\map.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\utility.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="C:\msys64\home\Balazs\p2p-chat\modules\map.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="C:\msys64\home\Balazs\p2p-chat\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{5691324B-D41C-3B91-9D94-E7E8BD1E2B7E}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{97F5A913-7E64-3E52-A02A-F84A81E52DF1}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

23
htdocs/header.html Normal file
View file

@ -0,0 +1,23 @@
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">P2P Chat</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="/">Home</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>

13
main.c
View file

@ -35,8 +35,10 @@ int main(void) {
fclose(seed_file);
char id[MD5_DIGEST_LENGTH];
md5(seed, id);
node_data mynode;
strncpy(mynode.id, id,MD5_DIGEST_LENGTH);
strcpy(mynode.id, id);
if(map_isFound(config,"nickname"))
strcpy(mynode.nick,map_getValue(config,"nickname"));
if(map_isFound(config,"port"))
@ -176,6 +178,15 @@ int main(void) {
closesocket(sock);
FD_CLR(sock, &master);
}
}else{
map m = getHandshakeData(buf);
char file[64];
int k = peer_getPeer(peerList1, sock);
sprintf(file,"%s%s.txt",DEFAULT_WWW_FOLDER,peerList1.array[k].peerData.id);
FILE *fp;
fp = fopen(file,"a");
fprintf(fp,"%s\n",map_getValue(m,"message"));
fclose(fp);
}
}
}

View file

@ -104,16 +104,18 @@ int webio_handleRequest(WebIO wio,peerList list){
while(buf[i] != '\n'){
i--;
}
i++;
char tmp[8196];
strcpy(tmp,buf+i);
map post = getHandshakeData(tmp);
res = webio_handlePOSTrequest(client, wio, list);
res = webio_handlePOSTrequest(client, wio,list,post);
}else
res = -1;
return res;
}
char* webio_getMIMEtype(char* filename){
char* ext = webio_getFiletype(filename);
if (strcmp(ext,"html") == 0)
@ -129,7 +131,7 @@ char* webio_getMIMEtype(char* filename){
else if (strcmp(ext, "png")== 0)
return "image/png";
else if (strcmp(ext, "ico")== 0)
return "image/ico";
return "image/x-icon";
else if (strcmp(ext, "xml")== 0)
return "text/xml";
else if (strcmp(ext, "zip")== 0)
@ -146,6 +148,7 @@ char* webio_getFiletype(char* filename){
}
return type;
}
int webio_handleGETrequest(SOCKET client,WebIO wio,char* file,peerList list){
char buf[8192];
@ -225,6 +228,29 @@ int webio_handleGETrequest(SOCKET client,WebIO wio,char* file,peerList list){
int webio_handlePOSTrequest(SOCKET client,WebIO wio,peerList list,map post){
shutdown(client,SD_RECEIVE);
char *response = (char *) malloc(sizeof(char) * 8192);
sprintf(response, "HTTP/1.1 304 Not Modified "
);
//strcat(response,getPeerPage(wio.folder,));
int res = send(client,response,strlen(response),0);
if(res == SOCKET_ERROR ) {
logger_log("Error with io");
return -1;
}
shutdown(client,SD_SEND);
if(map_isFound(post,"id") && map_isFound(post,"message")){
char buf[DEFAULT_BUFLEN];
sprintf(buf,"@message=%s",map_getValue(post,"message"));
res = send(list.array[peer_getIDPeer(list,map_getValue(post,"id"))].socket,buf,DEFAULT_BUFLEN,0);
if(res == SOCKET_ERROR){
logger_log("Error sending message.Error: %d",WSAGetLastError());
return -1;
}
logger_log("Message sent to %s",map_getValue(post,"id"));
}else map_dump(post);
}
char* webio_getHeader(char* folder) {
FILE *fp;
@ -276,8 +302,6 @@ char* getIndex(char* folder,peerList list){
strcat(content,"<script>setTimeout(function(){\n"
" window.location.reload(1);\n"
"}, 5000);</script>\n");
strcat(content,"<form method=\"POST\"><input name=\"msg\" type=\"text\"/><input name=\"s\" type=\"submit\"/></form>");
strcat(content,"</div>\n");
strcat(content,"</body>\n");
strcat(content,"</html>\n");
@ -289,6 +313,6 @@ char *getPeerPage(char *folder, Peer p) {
char * header = webio_getHeader(folder);
sprintf(content,"%s\n"
"<h1>%s</h1>\n"
"<form method=\"POST\"><input name=\"msg\" type=\"text\"/><input name=\"s\" type=\"submit\"/></form>",header,p.peerData.id);
"<div style=\"width: 75%%;margin: auto auto;bottom:0;position: fixed\"><form method=\"POST\"><textarea class=\"form-control\" name=\"message\"rows=\"4\" cols=\"50\"></textarea><input name=\"id\" type=\"text\" value=\"%s\" style=\"display:none\"/><input name=\"s\" type=\"submit\"/></form>",header,p.peerData.id,p.peerData.id);
return content;
}

10
peer.c
View file

@ -22,6 +22,7 @@ int peer_ConnetctTo(char* ip,int port,peerList* peerList, node_data my,fd_set* f
logger_log("Connected to peer!Sending handshake...");
char handshake[DEFAULT_BUFLEN];
sprintf(handshake,"@id=%s&port=%d",my.id,my.port);
if(strlen(my.nick) != 0) {
char buf[DEFAULT_BUFLEN];
ZeroMemory(buf,DEFAULT_BUFLEN);
@ -260,3 +261,12 @@ int peer_getIDPeer(struct peerList list, char* c) {
}
return -1;
}
Peer peer_getPeer_data(struct peerList list, char *c) {
Peer res;
for (int i = 0; i < list.length; ++i) {
if(strcmp(list.array[i].peerData.id,c) == 0)
return list.array[i];
}
return res;
}

3
peer.h
View file

@ -8,7 +8,7 @@
typedef struct Node_data {
char ip[NI_MAXHOST];
char id[MD5_DIGEST_LENGTH+1];
char id[33];
char nick[30];
int port;
} node_data;
@ -40,4 +40,5 @@ void peer_removeFromList(struct peerList *list, int i);
int peer_getPeer(struct peerList list,SOCKET socket);
int peer_getIDPeer(struct peerList list,char *c);
Peer peer_getPeer_data(struct peerList list,char *c);