publish changes

This commit is contained in:
Archie 2024-09-29 02:04:03 +00:00
parent afc5064a7b
commit ac2c6ac843
1605 changed files with 3354 additions and 3354 deletions

View file

@ -97,7 +97,7 @@
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<VcpkgInstalledDir>
@ -109,7 +109,7 @@
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>

View file

@ -6,7 +6,7 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <arch.h>
#endif
#ifdef __APPLE__

View file

@ -2,7 +2,7 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <arch.h>
#include <wchar.h>
// first, some standard int types
@ -33,7 +33,7 @@ typedef int socklen_t;
#include <stddef.h>
#include <stdint.h>
// since windows doesn't have stdint.h
// since arch doesn't have stdint.h
typedef unsigned __int64 uint64_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int16 uint16_t;

View file

@ -2,7 +2,7 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <arch.h>
#include <wchar.h>
// first, some standard int types
@ -34,7 +34,7 @@ typedef int socklen_t;
#if _MSC_VER >= 1600
#include <stdint.h>
#else
// since windows doesn't have stdint.h
// since arch doesn't have stdint.h
typedef unsigned __int64 uint64_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int16 uint16_t;

View file

@ -92,26 +92,26 @@
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>

View file

@ -15,7 +15,7 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <arch.h>
#include <winsock2.h>
#include <Ws2tcpip.h>
#include <wspiapi.h>

View file

@ -6,7 +6,7 @@
#ifdef __ANDROID__
#include "android/nsapev2.h"
#elif defined(_WIN32)
#include "windows/nsapev2.h"
#include "arch/nsapev2.h"
#elif defined(__linux__)
#include "linux/nsapev2.h"
#elif defined (__APPLE__)

View file

@ -154,7 +154,7 @@
<ClCompile Include="item.cpp" />
<ClCompile Include="nsapev2_common.cpp" />
<ClCompile Include="tag.cpp" />
<ClCompile Include="windows\nsapev2.cpp" />
<ClCompile Include="arch\nsapev2.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="flags.h" />
@ -164,7 +164,7 @@
<ClInclude Include="precomp.h" />
<ClInclude Include="tag.h" />
<ClInclude Include="util.h" />
<ClInclude Include="windows\nsapev2.h" />
<ClInclude Include="arch\nsapev2.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View file

@ -4,7 +4,7 @@
#ifdef __ANDROID__
#include "android/nsid3v2.h"
#elif defined(_WIN32)
#include "windows/nsid3v2.h"
#include "arch/nsid3v2.h"
#elif defined(__linux__)
#include "linux/nsid3v2.h"
#elif defined(__APPLE__)

View file

@ -13,7 +13,7 @@
*
\***************************************************************************/
/* the typedefs should be in place if we already got windows.h included */
/* the typedefs should be in place if we already got arch.h included */
#ifndef _INC_WINDOWS

View file

@ -1,7 +1,7 @@
#ifndef NULLSOFT_AUTOCHARH
#define NULLSOFT_AUTOCHARH
#ifdef WIN32
#include <windows.h>
#include <arch.h>
#include <stdlib.h>
inline char *AutoCharDupN(const wchar_t *convert, size_t len, UINT codePage = CP_ACP, UINT flags=0)

View file

@ -3,7 +3,7 @@
#ifdef _WIN32
#pragma warning (disable:4786)
#include <windows.h>
#include <arch.h>
#elif defined(__linux__) || defined(__APPLE__)
#include <pthread.h>
#else
@ -24,7 +24,7 @@ any threads using the mutex, and their function stack
#include <deque> // we make a list of the recursive function stack for each thread
#include <map> // and map
#include <iostream> // we output to std::cerr
#include <windows.h>
#include <arch.h>
/*****

View file

@ -1,7 +1,7 @@
#ifndef AUTOWIDEH
#define AUTOWIDEH
#ifdef WIN32
#include <windows.h>
#include <arch.h>
#include <stdlib.h>
inline wchar_t *AutoWideDup(const char *convert, UINT codePage=CP_ACP)

View file

@ -1,7 +1,7 @@
#include "LockFreeLIFO.h"
#include "foundation/atomics.h"
/* TODO: on windows, replace with InitializeSListHead/InterlockedPushEntrySList/InterlockedPopEntrySList just to be safe */
/* TODO: on arch, replace with InitializeSListHead/InterlockedPushEntrySList/InterlockedPopEntrySList just to be safe */
void lifo_init(lifo_t *lifo)
{
lifo->head = 0;

View file

@ -1,5 +1,5 @@
#pragma once
#include <windows.h>
#include <arch.h>
#ifdef __cplusplus
extern "C"

View file

@ -92,26 +92,26 @@
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>

View file

@ -12,7 +12,7 @@
#include <string.h>
#ifdef WIN32
#include <windows.h>
#include <arch.h>
#else
#include <pthread.h>
#endif //WIN32

View file

@ -2,7 +2,7 @@
#include "nu/queue_node.h"
#include <windows.h>
#include <arch.h>
#include <malloc.h>
/* lock free stack object

View file

@ -2,7 +2,7 @@
#include "nu/lfmpscq.h"
#include "nu/LockFreeLIFO.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <arch.h>
struct threadloop_node_t : public queue_node_t
{

View file

@ -1,7 +1,7 @@
#pragma once
#include "nu/lfmpscq.h"
#include "nu/LockFreeLIFO.h"
#include <windows.h>
#include <arch.h>
struct threadloop_node_t : public queue_node_t
{

View file

@ -2,7 +2,7 @@
#include "foundation/types.h"
#include "nu/lfmpscq.h"
#include "nu/LockFreeLIFO.h"
#include <windows.h>
#include <arch.h>
namespace nu
{

View file

@ -1,7 +1,7 @@
#pragma once
#include "nu/lfmpscq.h"
#include "nu/LockFreeLIFO.h"
#include <windows.h>
#include <arch.h>
struct threadloop_node_t : public queue_node_t
{

View file

@ -96,26 +96,26 @@
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>

View file

@ -1,7 +1,7 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <arch.h>
#include "NXFileObject.h"
#include "nx/nxfile.h"

View file

@ -12,7 +12,7 @@
/* TODO: benski> test this with a server that does not return content-length. I bet we could get it to work */
/* TODO: benski> on windows, we can use a single CreateFile HANDLE for both reading and writing
/* TODO: benski> on arch, we can use a single CreateFile HANDLE for both reading and writing
and use ReadFile(..., &overlapped) to maintain two separate file pointers
this should improve performance as they will share the same cache
_might_ have to use async I/O to get it to work (but use it synchronously by waiting on the handle after making the call
@ -625,7 +625,7 @@ ns_error_t NXFileObject_ProgressiveDownloader::Read(void *buffer, size_t bytes_r
}
/* TODO: benski> if r < bytes_requested, then we need to flush the buffer.
on windows, we can use fflush(progressive_file_read)
on arch, we can use fflush(progressive_file_read)
on other platforms it's not guaranteed! */
size_t r = fread(buffer, 1, bytes_requested, progressive_file_read);
this->position += r;

View file

@ -3,7 +3,7 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <arch.h>
#ifdef __cplusplus
extern "C" {

View file

@ -4,7 +4,7 @@
#include "nx/nxfile.h"
#include <sys/stat.h>
/* windows implementation */
/* arch implementation */
struct nx_data_struct_t
{
volatile size_t ref_count;

View file

@ -5,7 +5,7 @@
#include "../../nx/nxfile.h"
#include "../../nx/nxstring.h"
/* windows implementation */
/* arch implementation */
#ifdef __cplusplus
extern "C" {
#endif

View file

@ -2,7 +2,7 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <arch.h>
#include "../../nx/nxapi.h"
#include <stdio.h> // for FILE

View file

@ -1,7 +1,7 @@
#include "nxlog.h"
#include <stdio.h>
#include <stdarg.h>
//#include <windows.h>
//#include <arch.h>
static char *nx_log_tag = "libreplicant";
#define MAX_FMT_SIZE 512

View file

@ -3,7 +3,7 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <arch.h>
#ifdef __cplusplus
extern "C" {

View file

@ -1,5 +1,5 @@
#pragma once
#include <windows.h>
#include <arch.h>
#include "nx/nxapi.h"
#ifdef __cplusplus

View file

@ -3,7 +3,7 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <arch.h>
#ifdef __cplusplus
extern "C" {

View file

@ -1,6 +1,6 @@
#pragma once
#include "../../foundation/types.h"
#include <windows.h>
#include <arch.h>
#include "../../nx/nxapi.h"
#ifdef __cplusplus

View file

@ -4,7 +4,7 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <arch.h>
#ifdef __cplusplus
extern "C" {

View file

@ -22,7 +22,7 @@ extern "C" {
NX_API nx_uri_t NXURIMalloc(size_t characters);
NX_API int NXURICreateWithNXString(nx_uri_t *uri, nx_string_t string);
NX_API int NXURICreateFromPath(nx_uri_t *uri, const wchar_t *filename, const nx_uri_t path); // windows only
NX_API int NXURICreateFromPath(nx_uri_t *uri, const wchar_t *filename, const nx_uri_t path); // arch only
NX_API int NXURICreateWithPath(nx_uri_t *uri, const nx_uri_t filename, const nx_uri_t path);
NX_API int NXURICreateWithNXString(nx_uri_t *new_value, nx_string_t string);
NX_API int NXURICreateTempForFilepath(nx_uri_t *out_temp, nx_uri_t filename);

View file

@ -92,26 +92,26 @@
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>

View file

@ -105,26 +105,26 @@
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
<VcpkgConfiguration>Debug</VcpkgConfiguration>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<VcpkgInstalledDir>
</VcpkgInstalledDir>
<VcpkgUseStatic>false</VcpkgUseStatic>
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
<VcpkgTriplet>x86-arch-static-md</VcpkgTriplet>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>