Possible fix for mingw Win32 dll linking of nanosleep

pull/168/head
Michael Black 2020-01-08 22:50:37 -06:00
rodzic 97ea79082a
commit 5ae03f0eed
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
2 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -2439,6 +2439,7 @@ extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS(());
HAMLIB_EXPORT(void) rig_no_restore_ai();
#include <unistd.h>
#include <pthread.h> // so configure can pick up nanosleep on Win32
extern HAMLIB_EXPORT(int) hl_usleep(useconds_t msec);
__END_DECLS

Wyświetl plik

@ -38,6 +38,12 @@
#include <unistd.h>
#include <errno.h>
#include <time.h>
#include <pthread.h>
#ifdef __cplusplus
extern "C" {
#endif
// In order to stop the usleep warnings in cppcheck we provide our own interface
// So this will use system usleep or our usleep depending on availability of nanosleep
@ -91,3 +97,7 @@ int usleep(useconds_t usec)
return 0;
}
#endif // HAVE_NANOSLEEP
#ifdef __cplusplus
}
#endif