From 102f6163a17afec6e27107ec0fdfec5fd458c706 Mon Sep 17 00:00:00 2001 From: George Fleming Date: Tue, 3 Nov 2015 08:26:36 -0800 Subject: [PATCH] Remove unnecessary code --- native/isexecutable.cpp | 10 ++-------- native/issymlink.h | 2 +- native/pal.h | 22 ---------------------- 3 files changed, 3 insertions(+), 31 deletions(-) diff --git a/native/isexecutable.cpp b/native/isexecutable.cpp index dab536295..be49afb3c 100644 --- a/native/isexecutable.cpp +++ b/native/isexecutable.cpp @@ -1,6 +1,6 @@ //! @file isExecutable.cpp //! @author George FLeming -//! @brief returns whether a path is executable +//! @brief returns whether a file is executable #include #include @@ -21,19 +21,13 @@ //! @endparblock //! //! @exception errno Passes these errors via errno to GetLastError: -//! - ERROR_INVALID_PARAMETER: parameter is not valid //! - ERROR_BAD_ENVIRONMENT: locale is not UTF-8 -//! - ERROR_FILE_NOT_FOUND: file does not exist -//! - ERROR_ACCESS_DENIED: access is denied //! - ERROR_FILE_NOT_FOUND: the system cannot find the file specified //! - ERROR_INVALID_ADDRESS: attempt to access invalid address -//! - ERROR_STOPPED_ON_SYMLINK: the operation stopped after reaching a symbolic link //! - ERROR_GEN_FAILURE: device attached to the system is not functioning -//! - ERROR_NO_SUCH_USER: there was no corresponding entry in the utmp-file //! - ERROR_INVALID_NAME: filename, directory name, or volume label syntax is incorrect -//! - ERROR_BUFFER_OVERFLOW: file name is too long //! - ERROR_INVALID_FUNCTION: incorrect function -//! - ERROR_BAD_PATH_NAME: pathname is too long, or contains invalid characters +//! - ERROR_INVALID_PARAMETER: parameter to access(2) call is incorrect //! //! @retval 1 if path is an executable //! @retval 0 if path is not a executable diff --git a/native/issymlink.h b/native/issymlink.h index 3ba5e48ac..066a4060c 100644 --- a/native/issymlink.h +++ b/native/issymlink.h @@ -4,6 +4,6 @@ PAL_BEGIN_EXTERNC -long IsSymLink(const char* fileName); +int32_t IsSymLink(const char* fileName); PAL_END_EXTERNC diff --git a/native/pal.h b/native/pal.h index 421bbf0a8..2b97aee1d 100644 --- a/native/pal.h +++ b/native/pal.h @@ -8,28 +8,6 @@ # define NAME_MAX 255 #endif -/* typedef unsigned long DWORD, *LPDWORD; - typedef char BOOL; - typedef unsigned short WCHAR_T; - typedef unsigned int UINT32; - typedef int INT32; - typedef unsigned long HRESULT; - typedef const wchar_t *PCWSTR; - typedef wchar_t *PWSTR; - typedef const char *PCSTR; - typedef char *PSTR; - typedef void *PVOID; - typedef PVOID HANDLE; - typedef uint32_t UINT; - typedef char BYTE; - #define NO_ERROR 0 - #define INFINITE 0xFFFFFFFF - #define WINAPI - #define S_OK 0 - #define TRUE 1 - #define FALSE 0 -*/ - #define ERROR_INVALID_PARAMETER 87 #define ERROR_OUTOFMEMORY 14 #define ERROR_BAD_ENVIRONMENT 0x0000000A