Split win32 code.

This commit is contained in:
2021-03-11 16:51:04 +00:00
parent 14a25c8510
commit b88a3aff8d
22 changed files with 5083 additions and 4348 deletions

56
setter/src/win32/perms.c Normal file
View File

@@ -0,0 +1,56 @@
/****************************************************************************
Aaru Data Preservation Suite
-----------------------------------------------------------------------------
Filename : win32.c
Author(s) : Natalia Portillo
--[ Description ] -----------------------------------------------------------
Contains 32-bit and 64-bit Windows code
--[ License ] ---------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------------
Copyright (C) 2011-2021 Natalia Portillo
*****************************************************************************/
// ReSharper disable CppJoinDeclarationAndAssignment
// ReSharper disable CppDeprecatedEntity
#if defined(__WINDOWS__) || defined(__TOS_WIN__) || defined(__WIN32__) || defined(_WIN64) || defined(_WIN32) || \
defined(__NT__)
#define _CRT_SECURE_NO_WARNINGS 1
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "win32.h"
#include "../include/consts.h"
#include "../include/defs.h"
static DWORD dwMaxNameSize = MAX_PATH + 1;
static DWORD dwFilePermissions = GENERIC_READ | GENERIC_WRITE;
static DWORD oldVersion;
static HINSTANCE kernel32;
void FilePermissions(const char* path)
{ /* Do nothing, not supported by target operating system */
}
#endif