Commit f7991615 authored by da-woods's avatar da-woods Committed by GitHub

Fix "platform_adaptation" documentation test on windows (GH-4126)

For reasons I don't full understand, including "windows.h" seems to break everything. There's an alternative sleep function in stdlib.h so I've used that instead since it makes the point just as well.
parent 3d511fa7
cdef extern from *:
"""
#if defined(_WIN32) || defined(MS_WINDOWS) || defined(_MSC_VER)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define myapp_sleep(m) Sleep(m)
#include "stdlib.h"
#define myapp_sleep(m) _sleep(m)
#else
#include <unistd.h>
#define myapp_sleep(m) ((void) usleep((m) * 1000))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment