Fix some of the tests for MinGW and fix the use of Sleep/usleep for MinGW & MSVC platforms

* Sleep takes ms, not s
* Use sleep/Sleep rather than usleep in the cdchange sample, as usleep
  is not available on recent MinGW platforms

From pbatard branch.
This commit is contained in:
R. Bernstein
2012-02-24 22:03:19 -05:00
parent 871eca6415
commit 734c6473b3
4 changed files with 45 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
/* -*- C -*-
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>
Copyright (C) 2010, 2011 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2010, 2011, 2012 Rocky Bernstein <rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -36,7 +36,16 @@
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#if !defined(HAVE_SLEEP) && defined(_WIN32)
#include <windows.h>
#define sleep(s) Sleep(1000*s)
#endif
#define SKIP_TEST 77