Skip to content
TAEWON-CHOI edited this page Jan 9, 2023 · 4 revisions

Notes about code changes in this port:

  • each time a mutex is used (i.e. by zmalloc.c code) it needs to be explicitly initialized by a call to pthread_mutex_init(&mutex_name, NULL), which is defined for _WIN32 as a call to InitializeCriticalSectionAndSpinCount((a), 0x80000400),0; to make it easier for initializing I've made those mutexes non-static and later on introduced via extern keyword
  • original win-3.2.100 port adjusted format strings passed to sprintf due to a different convention for integer/long types, so each new code migrated from Redis needs to be reviewed (%ld -> %Id, %lu -> %Iu, %zu -> %Iu, %jd -> %lld, etc.)
  • similarly long fields need to be translated to their counterparts (can be easily done with search&replace, but needs to be done in listed order):
    • unsigned long long becomes PORT_ULONGLONG
    • long double becomes PORT_LONGDOUBLE
    • long long becomes PORT_LONGLONG
    • long becomes PORT_LONG.
Clone this wiki locally