htonll() and Windows 7
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 64/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- cpp
- Domain
- operating-systems
Research direction
Start in orm_lib/inc/drogon/orm/SqlBinder.h and inspect the existing preprocessor conditions and fallback definitions for htonll() and ntohll(). Done means applications using a Windows 7 SDK can compile and run with the fallback selected, while the existing platform conditions continue to work; consider the proposed configurable SDK macro only if the surrounding discussion supports it.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
htonll() (used in orm_lib/inc/drogon/orm/SqlBinder.h) is only available since Windows 8 and when compiling with NTDDI_VERSION>=NTDDI_WIN8. However I'd like to be able to compile and run our applications still on Windows 7.
Describe the solution you'd like
ATVL add a preprocessor condition to the existing ones that determine whether a fallback for htonll() and ntohll() need to be defined ad hoc:
#if defined __linux__ || defined __FreeBSD__ || defined __OpenBSD__ || \
defined __MINGW32__ || (defined NTDDI_VERSION && NTDDI_VERSION < NTDDI_WIN8)
Ideally I'd even like to see a custom macro denoting the minimum Windows SDK version to use, which can be set at configuration time, e.g. DR_NTDDI_VERSION which defaults to NTDDI_VERSION. This would separate the concerns of the library and the application (which possibly pulls in a higher Windows SDK version, but is using runtime function bindings).
Additional context
- OS: Windows 7
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 18h 57m
- Merged PRs (30d)
- 12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from drogonframework/drogon
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
drogonframework/drogon#2531 ·
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
drogonframework/drogon#2497 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
drogonframework/drogon#2449 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
drogonframework/drogon#2392 ·
-
help wanted
Difficulty 1/5 Under an hour Newbie friendliness 65/100
drogonframework/drogon#1878 · 18 comments · 12 reactions ·
All issues in drogonframework/drogon
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
infiniflow/infinity#3502 ·