2009-06-28 09:00:34 +08:00
|
|
|
/****************************************************************************
|
2020-02-12 17:50:22 +08:00
|
|
|
* Copyright 2018-2019,2020 Thomas E. Dickey *
|
|
|
|
* Copyright 2008-2010,2017 Free Software Foundation, Inc. *
|
2009-06-28 09:00:34 +08:00
|
|
|
* *
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a *
|
|
|
|
* copy of this software and associated documentation files (the *
|
|
|
|
* "Software"), to deal in the Software without restriction, including *
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish, *
|
|
|
|
* distribute, distribute with modifications, sublicense, and/or sell *
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is *
|
|
|
|
* furnished to do so, subject to the following conditions: *
|
|
|
|
* *
|
|
|
|
* The above copyright notice and this permission notice shall be included *
|
|
|
|
* in all copies or substantial portions of the Software. *
|
|
|
|
* *
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
|
|
|
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
|
|
|
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
|
|
|
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
|
|
|
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
|
|
|
* *
|
|
|
|
* Except as contained in this notice, the name(s) of the above copyright *
|
|
|
|
* holders shall not be used in advertising or otherwise to promote the *
|
|
|
|
* sale, use or other dealings in this Software without prior written *
|
|
|
|
* authorization. *
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
ncurses 6.1 - patch 20180623
+ use _WIN32/_WIN64 in preference to __MINGW32__/__MINGW64__ symbols
to simplify building with MSVC, since the former are defined in both
compiler configurations (report by Ali Abdulkadir).
+ further improvements to configure-checks from work on dialog, i.e.,
updated CF_ADD_INCDIR, CF_FIND_LINKAGE, CF_GCC_WARNINGS,
CF_GNU_SOURCE, CF_LARGEFILE, CF_POSIX_C_SOURCE, CF_SIZECHANGE, and
CF_TRY_XOPEN_SOURCE.
+ update config.guess, config.sub from
http://git.savannah.gnu.org/cgit/config.git
2018-06-24 08:40:50 +08:00
|
|
|
* Author: Thomas Dickey, 2008-on *
|
2009-06-28 09:00:34 +08:00
|
|
|
****************************************************************************/
|
|
|
|
|
2020-07-12 08:25:08 +08:00
|
|
|
/* $Id: nc_mingw.h,v 1.9 2020/07/11 22:13:19 tom Exp $ */
|
2009-06-28 09:00:34 +08:00
|
|
|
|
|
|
|
#ifndef NC_MINGW_H
|
|
|
|
#define NC_MINGW_H 1
|
|
|
|
|
ncurses 6.1 - patch 20180623
+ use _WIN32/_WIN64 in preference to __MINGW32__/__MINGW64__ symbols
to simplify building with MSVC, since the former are defined in both
compiler configurations (report by Ali Abdulkadir).
+ further improvements to configure-checks from work on dialog, i.e.,
updated CF_ADD_INCDIR, CF_FIND_LINKAGE, CF_GCC_WARNINGS,
CF_GNU_SOURCE, CF_LARGEFILE, CF_POSIX_C_SOURCE, CF_SIZECHANGE, and
CF_TRY_XOPEN_SOURCE.
+ update config.guess, config.sub from
http://git.savannah.gnu.org/cgit/config.git
2018-06-24 08:40:50 +08:00
|
|
|
#ifdef _WIN32
|
2020-07-12 08:25:08 +08:00
|
|
|
|
2010-09-26 09:21:45 +08:00
|
|
|
#ifdef WINVER
|
|
|
|
# if WINVER < 0x0501
|
|
|
|
# error WINVER must at least be 0x0501
|
ncurses 6.1 - patch 20180623
+ use _WIN32/_WIN64 in preference to __MINGW32__/__MINGW64__ symbols
to simplify building with MSVC, since the former are defined in both
compiler configurations (report by Ali Abdulkadir).
+ further improvements to configure-checks from work on dialog, i.e.,
updated CF_ADD_INCDIR, CF_FIND_LINKAGE, CF_GCC_WARNINGS,
CF_GNU_SOURCE, CF_LARGEFILE, CF_POSIX_C_SOURCE, CF_SIZECHANGE, and
CF_TRY_XOPEN_SOURCE.
+ update config.guess, config.sub from
http://git.savannah.gnu.org/cgit/config.git
2018-06-24 08:40:50 +08:00
|
|
|
# endif
|
2010-09-26 09:21:45 +08:00
|
|
|
#else
|
|
|
|
# define WINVER 0x0501
|
|
|
|
#endif
|
2009-06-28 09:00:34 +08:00
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#undef sleep
|
|
|
|
#define sleep(n) Sleep((n) * 1000)
|
|
|
|
|
|
|
|
#undef gettimeofday
|
|
|
|
#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
|
|
|
|
|
2020-03-01 09:58:39 +08:00
|
|
|
#if HAVE_SYS_TIME_H
|
ncurses 6.1 - patch 20180623
+ use _WIN32/_WIN64 in preference to __MINGW32__/__MINGW64__ symbols
to simplify building with MSVC, since the former are defined in both
compiler configurations (report by Ali Abdulkadir).
+ further improvements to configure-checks from work on dialog, i.e.,
updated CF_ADD_INCDIR, CF_FIND_LINKAGE, CF_GCC_WARNINGS,
CF_GNU_SOURCE, CF_LARGEFILE, CF_POSIX_C_SOURCE, CF_SIZECHANGE, and
CF_TRY_XOPEN_SOURCE.
+ update config.guess, config.sub from
http://git.savannah.gnu.org/cgit/config.git
2018-06-24 08:40:50 +08:00
|
|
|
#include <sys/time.h> /* for struct timeval */
|
2020-03-01 09:58:39 +08:00
|
|
|
#endif
|
2009-06-28 09:00:34 +08:00
|
|
|
|
2020-07-12 08:25:08 +08:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#include <winsock2.h> /* for struct timeval */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <ncurses_dll.h>
|
|
|
|
|
|
|
|
NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *);
|
2009-06-28 09:00:34 +08:00
|
|
|
|
|
|
|
#undef HAVE_GETTIMEOFDAY
|
|
|
|
#define HAVE_GETTIMEOFDAY 1
|
|
|
|
|
|
|
|
#define SIGHUP 1
|
|
|
|
#define SIGKILL 9
|
|
|
|
#define getlogin() "username"
|
|
|
|
|
2010-08-08 08:55:18 +08:00
|
|
|
#undef wcwidth
|
2019-06-24 07:43:23 +08:00
|
|
|
#define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs))
|
2020-07-12 08:25:08 +08:00
|
|
|
NCURSES_EXPORT(int) _nc_wcwidth(wchar_t);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2010-08-08 08:55:18 +08:00
|
|
|
|
ncurses 6.1 - patch 20180623
+ use _WIN32/_WIN64 in preference to __MINGW32__/__MINGW64__ symbols
to simplify building with MSVC, since the former are defined in both
compiler configurations (report by Ali Abdulkadir).
+ further improvements to configure-checks from work on dialog, i.e.,
updated CF_ADD_INCDIR, CF_FIND_LINKAGE, CF_GCC_WARNINGS,
CF_GNU_SOURCE, CF_LARGEFILE, CF_POSIX_C_SOURCE, CF_SIZECHANGE, and
CF_TRY_XOPEN_SOURCE.
+ update config.guess, config.sub from
http://git.savannah.gnu.org/cgit/config.git
2018-06-24 08:40:50 +08:00
|
|
|
#endif /* _WIN32 */
|
2017-07-23 08:30:14 +08:00
|
|
|
|
2009-06-28 09:00:34 +08:00
|
|
|
#endif /* NC_MINGW_H */
|