Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistently use lowercase for Windows libraries and header files #1058

Merged
merged 6 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ file (GLOB AWS_COMMON_EXTERNAL_SRC
option(AWS_NUM_CPU_CORES "Number of CPU cores of the target machine. Useful when cross-compiling." 0)

if (WIN32)
set(WINDOWS_KERNEL_LIB "Kernel32" CACHE STRING "The name of the kernel library to link against (default: Kernel32)")
set(WINDOWS_KERNEL_LIB "kernel32" CACHE STRING "The name of the kernel library to link against (default: kernel32)")

file(GLOB AWS_COMMON_OS_HEADERS
"include/aws/common/windows/*"
Expand All @@ -84,7 +84,7 @@ if (WIN32)
# PSAPI_VERSION=1 is needed to support GetProcessMemoryInfo on both pre and
# post Win7 OS's.
list(APPEND PLATFORM_DEFINES PSAPI_VERSION=1)
list(APPEND PLATFORM_LIBS BCrypt ${WINDOWS_KERNEL_LIB} Ws2_32 Shlwapi Psapi)
list(APPEND PLATFORM_LIBS bcrypt ${WINDOWS_KERNEL_LIB} ws2_32 shlwapi psapi)
else ()
file(GLOB AWS_COMMON_OS_HEADERS
"include/aws/common/posix/*"
Expand Down
2 changes: 1 addition & 1 deletion cmake/AwsFeatureTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if(NOT CMAKE_CROSSCOMPILING)
endif()

check_c_source_compiles("
#include <Windows.h>
#include <windows.h>
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
int main() {
return 0;
Expand Down
2 changes: 1 addition & 1 deletion include/aws/common/condition_variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct aws_condition_variable {
* You can do something like struct aws_condition_variable var =
* AWS_CONDITION_VARIABLE_INIT;
*
* If on Windows and you get an error about AWS_CONDITION_VARIABLE_INIT being undefined, please include Windows.h to get
* If on Windows and you get an error about AWS_CONDITION_VARIABLE_INIT being undefined, please include windows.h to get
* CONDITION_VARIABLE_INIT.
*/
#ifdef _WIN32
Expand Down
2 changes: 1 addition & 1 deletion include/aws/common/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <aws/common/common.h>
#ifdef _WIN32
/* NOTE: Do not use this macro before including Windows.h */
/* NOTE: Do not use this macro before including windows.h */
# define AWSMUTEX_TO_WINDOWS(pMutex) (PSRWLOCK) & (pMutex)->mutex_handle
#else
# include <pthread.h>
Expand Down
2 changes: 1 addition & 1 deletion include/aws/common/rw_lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <aws/common/common.h>
#ifdef _WIN32
/* NOTE: Do not use this macro before including Windows.h */
/* NOTE: Do not use this macro before including windows.h */
# define AWSSRW_TO_WINDOWS(pCV) (PSRWLOCK) pCV
#else
# include <pthread.h>
Expand Down
2 changes: 1 addition & 1 deletion include/aws/testing/aws_test_harness.h
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static inline int s_aws_run_test_case(struct aws_test_harness *harness) {
/* https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences */
#ifdef _WIN32

# include <Windows.h>
# include <windows.h>

# ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
# define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
Expand Down
2 changes: 1 addition & 1 deletion source/allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <stdlib.h>

#ifdef _WIN32
# include <Windows.h>
# include <windows.h>
#endif

#ifdef __MACH__
Expand Down
2 changes: 1 addition & 1 deletion source/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <stdlib.h>

#ifdef _WIN32
# include <Windows.h>
# include <windows.h>
#else
# include <dlfcn.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion source/windows/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0.
*/

#include <Windows.h>
#include <aws/common/clock.h>
#include <windows.h>

static const uint64_t FILE_TIME_TO_NS = 100;
static const uint64_t EC_TO_UNIX_EPOCH = 11644473600LL;
Expand Down
2 changes: 1 addition & 1 deletion source/windows/condition_variable.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <aws/common/clock.h>
#include <aws/common/mutex.h>

#include <Windows.h>
#include <windows.h>

#define AWSCV_TO_WINDOWS(pCV) (PCONDITION_VARIABLE) & (pCV)->condition_handle

Expand Down
3 changes: 2 additions & 1 deletion source/windows/device_random.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#include <aws/common/byte_buf.h>
#include <aws/common/thread.h>

#include <Windows.h>
#include <windows.h>

#include <bcrypt.h>

static BCRYPT_ALG_HANDLE s_alg_handle = NULL;
Expand Down
2 changes: 1 addition & 1 deletion source/windows/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <aws/common/logging.h>
#include <aws/common/string.h>

#include <Shlwapi.h>
#include <errno.h>
#include <io.h>
#include <shlwapi.h>
#include <stdio.h>
#include <windows.h>

Expand Down
2 changes: 1 addition & 1 deletion source/windows/mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <aws/common/mutex.h>
#include <aws/common/thread.h>

#include <Windows.h>
#include <windows.h>

/* Convert a string from a macro to a wide string */
#define WIDEN2(s) L## #s
Expand Down
3 changes: 2 additions & 1 deletion source/windows/rw_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
#include <aws/common/rw_lock.h>
#include <aws/common/thread.h>

#include <Windows.h>
#include <windows.h>

#include <synchapi.h>

/* Convert a string from a macro to a wide string */
Expand Down
2 changes: 1 addition & 1 deletion source/windows/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <aws/common/private/thread_shared.h>
#include <aws/common/string.h>

#include <Windows.h>
#include <windows.h>

#include <inttypes.h>

Expand Down
Loading