mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Miscellaneous header files (needed for building libpbd with MSVC)
This commit is contained in:
parent
110972e59a
commit
eeabf89d19
10 changed files with 2294 additions and 0 deletions
73
msvc_extra_headers/ardourext/float_cast.h.input
Normal file
73
msvc_extra_headers/ardourext/float_cast.h.input
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
/*
|
||||||
|
** Copyright (C) 2001 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||||
|
**
|
||||||
|
** Permission to use, copy, modify, distribute, and sell this file for any
|
||||||
|
** purpose is hereby granted without fee, provided that the above copyright
|
||||||
|
** and this permission notice appear in all copies. No representations are
|
||||||
|
** made about the suitability of this software for any purpose. It is
|
||||||
|
** provided "as is" without express or implied warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Version 1.1 */
|
||||||
|
|
||||||
|
|
||||||
|
/*============================================================================
|
||||||
|
** On Intel Pentium processors (especially PIII and probably P4), converting
|
||||||
|
** from float to int is very slow. To meet the C specs, the code produced by
|
||||||
|
** most C compilers targeting Pentium needs to change the FPU rounding mode
|
||||||
|
** before the float to int conversion is performed.
|
||||||
|
**
|
||||||
|
** Changing the FPU rounding mode causes the FPU pipeline to be flushed. It
|
||||||
|
** is this flushing of the pipeline which is so slow.
|
||||||
|
**
|
||||||
|
** Fortunately the ISO C99 specifications define the functions lrint, lrintf,
|
||||||
|
** llrint and llrintf which fix this problem as a side effect.
|
||||||
|
**
|
||||||
|
** On Unix-like systems, the configure process should have detected the
|
||||||
|
** presence of these functions. If they weren't found we have to replace them
|
||||||
|
** here with a standard C cast.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** The C99 prototypes for lrint and lrintf are as follows:
|
||||||
|
**
|
||||||
|
** long int lrintf (float x) ;
|
||||||
|
** long int lrint (double x) ;
|
||||||
|
*/
|
||||||
|
#ifndef __FLOAT_CAST_H__ // Added by JE - 30-11-2009
|
||||||
|
#define __FLOAT_CAST_H__
|
||||||
|
#if (defined (WIN32) || defined (_WIN32))
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
/* Win32 doesn't seem to have these functions.
|
||||||
|
** Therefore implement inline versions of these functions here.
|
||||||
|
*/
|
||||||
|
|
||||||
|
__inline long int
|
||||||
|
lrint (double flt)
|
||||||
|
{ int intgr;
|
||||||
|
|
||||||
|
_asm
|
||||||
|
{ fld flt
|
||||||
|
fistp intgr
|
||||||
|
} ;
|
||||||
|
|
||||||
|
return intgr ;
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline long int
|
||||||
|
lrintf (float flt)
|
||||||
|
{ int intgr;
|
||||||
|
|
||||||
|
_asm
|
||||||
|
{ fld flt
|
||||||
|
fistp intgr
|
||||||
|
} ;
|
||||||
|
|
||||||
|
return intgr ;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __FLOAT_CAST_H__
|
||||||
46
msvc_extra_headers/ardourext/libcharset.h.input
Normal file
46
msvc_extra_headers/ardourext/libcharset.h.input
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
/* Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU CHARSET Library.
|
||||||
|
|
||||||
|
The GNU CHARSET Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU CHARSET Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public License
|
||||||
|
along with the GNU CHARSET Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 51 Franklin Street,
|
||||||
|
Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
|
#ifndef _LIBCHARSET_H
|
||||||
|
#define _LIBCHARSET_H
|
||||||
|
|
||||||
|
#include <ardourext/localcharset.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Support for relocatable packages. */
|
||||||
|
|
||||||
|
/* Sets the original and the current installation prefix of the package.
|
||||||
|
Relocation simply replaces a pathname starting with the original prefix
|
||||||
|
by the corresponding pathname with the current prefix instead. Both
|
||||||
|
prefixes should be directory names without trailing slash (i.e. use ""
|
||||||
|
instead of "/"). */
|
||||||
|
extern void libcharset_set_relocation_prefix (const char *orig_prefix,
|
||||||
|
const char *curr_prefix);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _LIBCHARSET_H */
|
||||||
42
msvc_extra_headers/ardourext/localcharset.h.input
Normal file
42
msvc_extra_headers/ardourext/localcharset.h.input
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
/* Determine a canonical name for the current locale's character encoding.
|
||||||
|
Copyright (C) 2000-2003 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU CHARSET Library.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Library General Public License as published
|
||||||
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||||
|
USA. */
|
||||||
|
|
||||||
|
#ifndef _LOCALCHARSET_H
|
||||||
|
#define _LOCALCHARSET_H
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Determine the current locale's character encoding, and canonicalize it
|
||||||
|
into one of the canonical names listed in config.charset.
|
||||||
|
The result must not be freed; it is statically allocated.
|
||||||
|
If the canonical name cannot be determined, the result is a non-canonical
|
||||||
|
name. */
|
||||||
|
extern const char * locale_charset (void);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _LOCALCHARSET_H */
|
||||||
223
msvc_extra_headers/ardourext/misc.h.input
Normal file
223
msvc_extra_headers/ardourext/misc.h.input
Normal file
|
|
@ -0,0 +1,223 @@
|
||||||
|
/*
|
||||||
|
Copyright (C) 2009 John Emmas
|
||||||
|
|
||||||
|
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
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ardour_msvc_extensions_h__
|
||||||
|
#define __ardour_msvc_extensions_h__
|
||||||
|
|
||||||
|
#ifndef _WIN32_WINNT
|
||||||
|
#define _WIN32_WINNT 0x0500
|
||||||
|
#endif
|
||||||
|
#ifndef _CPP_VECTOR
|
||||||
|
#define _CPP_VECTOR 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <math.h>
|
||||||
|
#include <float.h>
|
||||||
|
#include <direct.h>
|
||||||
|
#include <boost/regex.h>
|
||||||
|
#include <glib.h>
|
||||||
|
#include <ardourext/float_cast.h>
|
||||||
|
|
||||||
|
// 'std::isnan()' is not available in MSVC. Assume '_isnan(double)'
|
||||||
|
#define isnan(val) (bool)_isnan((double)val)
|
||||||
|
|
||||||
|
// 'std::isinf()' is not available in MSVC. Assume '!_finite(double)'
|
||||||
|
#define isinf(val) !((bool)_finite((double)val))
|
||||||
|
|
||||||
|
// 'INFINITY' is not defined in MSVC. Assume 'HUGE_VAL'
|
||||||
|
#ifndef INFINITY
|
||||||
|
#define INFINITY HUGE_VAL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// File access modes copied from unistd.h
|
||||||
|
#define F_OK 0
|
||||||
|
#define R_OK 4
|
||||||
|
#define W_OK 2
|
||||||
|
#define X_OK 1
|
||||||
|
|
||||||
|
// Miscellaneous #defines
|
||||||
|
#define __attribute__(x)
|
||||||
|
#define llabs _abs64
|
||||||
|
#define atoll _atoi64
|
||||||
|
#define access _access
|
||||||
|
#define getcwd _getcwd
|
||||||
|
#define getpid _getpid
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#define link ntfs_link
|
||||||
|
#define unlink ntfs_unlink
|
||||||
|
#define strcasecmp stricmp
|
||||||
|
#define strncasecmp strnicmp
|
||||||
|
#define strtok_r( _s, _sep, _lasts ) \
|
||||||
|
( *(_lasts) = strtok( (_s), (_sep) ) )
|
||||||
|
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
#define PATH_MAX _MAX_PATH
|
||||||
|
#endif
|
||||||
|
#define DECLARE_DEFAULT_COMPARISONS(Type) \
|
||||||
|
extern bool operator > (const Type& lhs, const Type& rhs); \
|
||||||
|
extern bool operator < (const Type& lhs, const Type& rhs); \
|
||||||
|
extern bool operator != (const Type& lhs, const Type& rhs); \
|
||||||
|
extern bool operator == (const Type& lhs, const Type& rhs);
|
||||||
|
|
||||||
|
// Types missing from Win32 'stat.h' (hopefully Windows
|
||||||
|
// will either act sensibly or ignore most of them).
|
||||||
|
#define _S_IFBLK 0x3000
|
||||||
|
#define S_IRWXU _S_IRWXU
|
||||||
|
#define S_IXUSR _S_IXUSR
|
||||||
|
#define S_IWUSR _S_IWUSR
|
||||||
|
#define S_IRUSR _S_IRUSR
|
||||||
|
#define S_IXGRP _S_IXGRP
|
||||||
|
#define S_IWGRP _S_IWGRP
|
||||||
|
#define S_IRGRP _S_IRGRP
|
||||||
|
#define S_IXOTH _S_IXOTH
|
||||||
|
#define S_IWOTH _S_IWOTH
|
||||||
|
#define S_IROTH _S_IROTH
|
||||||
|
|
||||||
|
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
|
||||||
|
#define _S_IXUSR _S_IEXEC
|
||||||
|
#define _S_IWUSR _S_IWRITE
|
||||||
|
#define _S_IRUSR _S_IREAD
|
||||||
|
#define _S_IXGRP _S_IEXEC
|
||||||
|
#define _S_IWGRP _S_IWRITE
|
||||||
|
#define _S_IRGRP _S_IREAD
|
||||||
|
#define _S_IXOTH _S_IEXEC
|
||||||
|
#define _S_IWOTH _S_IWRITE
|
||||||
|
#define _S_IROTH _S_IREAD
|
||||||
|
|
||||||
|
#define S_ISFIFO(m) _S_ISFIFO(m)
|
||||||
|
#define S_ISDIR(m) _S_ISDIR(m)
|
||||||
|
#define S_ISCHR(m) _S_ISCHR(m)
|
||||||
|
#define S_ISBLK(m) _S_ISBLK(m)
|
||||||
|
#define S_ISREG(m) _S_ISREG(m)
|
||||||
|
|
||||||
|
#define _S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO)
|
||||||
|
#define _S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
|
||||||
|
#define _S_ISCHR(m) (((m) & _S_IFMT) == _S_IFCHR)
|
||||||
|
#define _S_ISBLK(m) (((m) & _S_IFMT) == _S_IFBLK)
|
||||||
|
#define _S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__USE_BSD) || defined(_BSD_SOURCE)
|
||||||
|
/* Convenience macros for operations on timevals.
|
||||||
|
NOTE: `timercmp' does not work for >= or <=.
|
||||||
|
Note also that 'timerset', 'timerclear' and
|
||||||
|
'timercmp' are (perhaps strangely) already
|
||||||
|
defined, along with various other 'time'
|
||||||
|
functions in WinSock.h */
|
||||||
|
# define timeradd(a, b, result) \
|
||||||
|
do { \
|
||||||
|
(result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
|
||||||
|
(result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
|
||||||
|
if ((result)->tv_usec >= 1000000) \
|
||||||
|
{ \
|
||||||
|
++(result)->tv_sec; \
|
||||||
|
(result)->tv_usec -= 1000000; \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
# define timersub(a, b, result) \
|
||||||
|
do { \
|
||||||
|
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
|
||||||
|
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
|
||||||
|
if ((result)->tv_usec < 0) { \
|
||||||
|
--(result)->tv_sec; \
|
||||||
|
(result)->tv_usec += 1000000; \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
#endif /* BSD */
|
||||||
|
|
||||||
|
#if !defined(__BIT_TYPES_DEFINED) || !defined(__BIT_TYPES_DEFINED__)
|
||||||
|
#define __BIT_TYPES_DEFINED__ 1
|
||||||
|
// Doesn't yet define all 'bit types'. Only those
|
||||||
|
// needed by Ardour. More can be added as needed.
|
||||||
|
#ifndef __int8_t_defined
|
||||||
|
#define __int8_t_defined
|
||||||
|
typedef unsigned char u_int8_t;
|
||||||
|
typedef unsigned short int u_int16_t;
|
||||||
|
typedef unsigned int u_int32_t;
|
||||||
|
typedef unsigned __int64 u_int64_t;
|
||||||
|
|
||||||
|
typedef signed char int8_t;
|
||||||
|
typedef unsigned char uint8_t;
|
||||||
|
typedef short int16_t;
|
||||||
|
typedef unsigned short uint16_t;
|
||||||
|
typedef int int32_t;
|
||||||
|
typedef unsigned uint32_t;
|
||||||
|
typedef long long int64_t;
|
||||||
|
typedef unsigned long long uint64_t;
|
||||||
|
#endif // __int8_t
|
||||||
|
|
||||||
|
#ifndef __register_t_defined
|
||||||
|
#define __register_t_defined
|
||||||
|
typedef int register_t;
|
||||||
|
#endif // __register_t
|
||||||
|
#endif // __BIT_TYPESD
|
||||||
|
|
||||||
|
// throw()
|
||||||
|
#ifndef __THROW
|
||||||
|
#define __THROW throw()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// round().... Unlike Linux, Windows doesn't seem to support the
|
||||||
|
// concept of a system-wide (or programmable) rounding direction.
|
||||||
|
// Fortunately, 'round to nearest' seems to be the default action
|
||||||
|
// under Linux, so let's copy that until we find out otherwise.
|
||||||
|
#define rint(value) round(value)
|
||||||
|
#define round(value) floor((value) + 0.5)
|
||||||
|
|
||||||
|
// System V compatibility
|
||||||
|
typedef unsigned short ushort;
|
||||||
|
typedef unsigned int uint;
|
||||||
|
|
||||||
|
// mode_t
|
||||||
|
#ifndef _MODE_T_
|
||||||
|
#define _MODE_T_
|
||||||
|
typedef unsigned short _mode_t;
|
||||||
|
|
||||||
|
#ifndef NO_OLDNAMES
|
||||||
|
typedef _mode_t mode_t;
|
||||||
|
#endif /* NO_OLDNAMES */
|
||||||
|
#endif /* _MODE_T_ */
|
||||||
|
|
||||||
|
// fmin() and fmax()
|
||||||
|
#define fmin(a, b) min((double)a, (double)b)
|
||||||
|
#define fmax(a, b) max((double)a, (double)b)
|
||||||
|
|
||||||
|
// approximate POSIX pipe()
|
||||||
|
#define pipe(handles) _pipe(handles, 4096, _O_BINARY)
|
||||||
|
|
||||||
|
// Windows mkdir() doesn't care about access privileges
|
||||||
|
#define mkdir(path, mode) _mkdir(path)
|
||||||
|
|
||||||
|
// Redefine 'ftruncate()' to use the glib-win32 version
|
||||||
|
#define ftruncate(fd, len) g_win32_ftruncate((gint)fd, (guint)len)
|
||||||
|
|
||||||
|
|
||||||
|
// #include the main headers for Ardour MSVC
|
||||||
|
#if defined(BUILDING_PBD) || defined(PBD_IS_IN_WIN_STATIC_LIB)
|
||||||
|
#include <pbd/msvc_pbd.h>
|
||||||
|
#endif
|
||||||
|
#if defined(BUILDING_LIBARDOUR) || defined(LIBARDOUR_IS_IN_WIN_STATIC_LIB)
|
||||||
|
#include <ardour/msvc_libardour.h>
|
||||||
|
#endif
|
||||||
|
#if defined(BUILDING_RUBBERBAND) || defined(RUBBERBAND_IS_IN_WIN_STATIC_LIB)
|
||||||
|
#include <rubberband/msvc_rubberband.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __ardour_msvc_extensions_h__ */
|
||||||
7
msvc_extra_headers/ardourext/pthread.h.input
Normal file
7
msvc_extra_headers/ardourext/pthread.h.input
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#if !defined( PTHREAD_H )
|
||||||
|
#ifdef _PTHREAD_H // Test added by JE - 12-12-2009
|
||||||
|
#error "ardourext/pthread.h conflicts with an existing pthread library"
|
||||||
|
#else
|
||||||
|
#include <ardourext/ptw32/pthread.h>
|
||||||
|
#endif /* _PTHREAD_H */
|
||||||
|
#endif /* PTHREAD_H */
|
||||||
1373
msvc_extra_headers/ardourext/ptw32/pthread.h.input
Normal file
1373
msvc_extra_headers/ardourext/ptw32/pthread.h.input
Normal file
File diff suppressed because it is too large
Load diff
183
msvc_extra_headers/ardourext/sched.h.input
Normal file
183
msvc_extra_headers/ardourext/sched.h.input
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
/*
|
||||||
|
* Module: sched.h
|
||||||
|
*
|
||||||
|
* Purpose:
|
||||||
|
* Provides an implementation of POSIX realtime extensions
|
||||||
|
* as defined in
|
||||||
|
*
|
||||||
|
* POSIX 1003.1b-1993 (POSIX.1b)
|
||||||
|
*
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Pthreads-win32 - POSIX Threads Library for Win32
|
||||||
|
* Copyright(C) 1998 John E. Bossom
|
||||||
|
* Copyright(C) 1999,2005 Pthreads-win32 contributors
|
||||||
|
*
|
||||||
|
* Contact Email: rpj@callisto.canberra.edu.au
|
||||||
|
*
|
||||||
|
* The current list of contributors is contained
|
||||||
|
* in the file CONTRIBUTORS included with the source
|
||||||
|
* code distribution. The list can also be seen at the
|
||||||
|
* following World Wide Web location:
|
||||||
|
* http://sources.redhat.com/pthreads-win32/contributors.html
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library in the file COPYING.LIB;
|
||||||
|
* if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
|
*/
|
||||||
|
#ifndef SCHED_H
|
||||||
|
#ifdef _SCHED_H // Test added by JE - 12-12-2009
|
||||||
|
#error "ardourext/sched.h conflicts with an existing pthread library"
|
||||||
|
#endif
|
||||||
|
// Now make sure we can't accidentally include a conflicting library !!
|
||||||
|
#define _SCHED_H
|
||||||
|
#define SCHED_H
|
||||||
|
|
||||||
|
#undef PTW32_LEVEL
|
||||||
|
|
||||||
|
#if defined(_POSIX_SOURCE)
|
||||||
|
#define PTW32_LEVEL 0
|
||||||
|
/* Early POSIX */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309
|
||||||
|
#undef PTW32_LEVEL
|
||||||
|
#define PTW32_LEVEL 1
|
||||||
|
/* Include 1b, 1c and 1d */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(INCLUDE_NP)
|
||||||
|
#undef PTW32_LEVEL
|
||||||
|
#define PTW32_LEVEL 2
|
||||||
|
/* Include Non-Portable extensions */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PTW32_LEVEL_MAX 3
|
||||||
|
|
||||||
|
#if !defined(PTW32_LEVEL)
|
||||||
|
#define PTW32_LEVEL PTW32_LEVEL_MAX
|
||||||
|
/* Include everything */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if __GNUC__ && ! defined (__declspec)
|
||||||
|
# error Please upgrade your GNU compiler to one that supports __declspec.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When building the DLL code, you should define PTW32_BUILD so that
|
||||||
|
* the variables/functions are exported correctly. When using the DLL,
|
||||||
|
* do NOT define PTW32_BUILD, and then the variables/functions will
|
||||||
|
* be imported correctly.
|
||||||
|
*/
|
||||||
|
#ifndef PTW32_STATIC_LIB
|
||||||
|
# ifdef PTW32_BUILD
|
||||||
|
# define PTW32_DLLPORT __declspec (dllexport)
|
||||||
|
# else
|
||||||
|
# define PTW32_DLLPORT __declspec (dllimport)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define PTW32_DLLPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is a duplicate of what is in the autoconf config.h,
|
||||||
|
* which is only used when building the pthread-win32 libraries.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PTW32_CONFIG_H
|
||||||
|
# if defined(WINCE)
|
||||||
|
# define NEED_ERRNO
|
||||||
|
# define NEED_SEM
|
||||||
|
# endif
|
||||||
|
# if defined(_UWIN) || defined(__MINGW32__)
|
||||||
|
# define HAVE_MODE_T
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if PTW32_LEVEL >= PTW32_LEVEL_MAX
|
||||||
|
#ifdef NEED_ERRNO
|
||||||
|
#include "need_errno.h"
|
||||||
|
#else
|
||||||
|
#include <errno.h>
|
||||||
|
#endif
|
||||||
|
#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
|
||||||
|
|
||||||
|
#if defined(__MINGW32__) || defined(_UWIN)
|
||||||
|
#if PTW32_LEVEL >= PTW32_LEVEL_MAX
|
||||||
|
/* For pid_t */
|
||||||
|
# include <sys/types.h>
|
||||||
|
/* Required by Unix 98 */
|
||||||
|
# include <time.h>
|
||||||
|
#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
|
||||||
|
#else
|
||||||
|
typedef int pid_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Thread scheduling policies */
|
||||||
|
|
||||||
|
enum {
|
||||||
|
SCHED_OTHER = 0,
|
||||||
|
SCHED_FIFO,
|
||||||
|
SCHED_RR,
|
||||||
|
SCHED_MIN = SCHED_OTHER,
|
||||||
|
SCHED_MAX = SCHED_RR
|
||||||
|
};
|
||||||
|
|
||||||
|
struct sched_param {
|
||||||
|
int sched_priority;
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sched_yield (void);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sched_get_priority_min (int policy);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sched_get_priority_max (int policy);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sched_setscheduler (pid_t pid, int policy);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sched_getscheduler (pid_t pid);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note that this macro returns ENOTSUP rather than
|
||||||
|
* ENOSYS as might be expected. However, returning ENOSYS
|
||||||
|
* should mean that sched_get_priority_{min,max} are
|
||||||
|
* not implemented as well as sched_rr_get_interval.
|
||||||
|
* This is not the case, since we just don't support
|
||||||
|
* round-robin scheduling. Therefore I have chosen to
|
||||||
|
* return the same value as sched_setscheduler when
|
||||||
|
* SCHED_RR is passed to it.
|
||||||
|
*/
|
||||||
|
#define sched_rr_get_interval(_pid, _interval) \
|
||||||
|
( errno = ENOTSUP, (int) -1 )
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* End of extern "C" */
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#undef PTW32_LEVEL
|
||||||
|
#undef PTW32_LEVEL_MAX
|
||||||
|
|
||||||
|
#endif /* !SCHED_H */
|
||||||
|
|
||||||
171
msvc_extra_headers/ardourext/semaphore.h.input
Normal file
171
msvc_extra_headers/ardourext/semaphore.h.input
Normal file
|
|
@ -0,0 +1,171 @@
|
||||||
|
/*
|
||||||
|
* Module: semaphore.h
|
||||||
|
*
|
||||||
|
* Purpose:
|
||||||
|
* Semaphores aren't actually part of the PThreads standard.
|
||||||
|
* They are defined by the POSIX Standard:
|
||||||
|
*
|
||||||
|
* POSIX 1003.1b-1993 (POSIX.1b)
|
||||||
|
*
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Pthreads-win32 - POSIX Threads Library for Win32
|
||||||
|
* Copyright(C) 1998 John E. Bossom
|
||||||
|
* Copyright(C) 1999,2005 Pthreads-win32 contributors
|
||||||
|
*
|
||||||
|
* Contact Email: rpj@callisto.canberra.edu.au
|
||||||
|
*
|
||||||
|
* The current list of contributors is contained
|
||||||
|
* in the file CONTRIBUTORS included with the source
|
||||||
|
* code distribution. The list can also be seen at the
|
||||||
|
* following World Wide Web location:
|
||||||
|
* http://sources.redhat.com/pthreads-win32/contributors.html
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library in the file COPYING.LIB;
|
||||||
|
* if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
|
*/
|
||||||
|
#if !defined( SEMAPHORE_H )
|
||||||
|
#ifdef _SEMAPHORE_H // Test added by JE - 12-12-2009
|
||||||
|
#error "ardourext/semaphore.h conflicts with an existing pthread library"
|
||||||
|
#endif
|
||||||
|
// Now make sure we can't accidentally include a conflicting library !!
|
||||||
|
#define _SEMAPHORE_H
|
||||||
|
#define SEMAPHORE_H
|
||||||
|
|
||||||
|
#undef PTW32_LEVEL
|
||||||
|
|
||||||
|
#if defined(_POSIX_SOURCE)
|
||||||
|
#define PTW32_LEVEL 0
|
||||||
|
/* Early POSIX */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309
|
||||||
|
#undef PTW32_LEVEL
|
||||||
|
#define PTW32_LEVEL 1
|
||||||
|
/* Include 1b, 1c and 1d */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(INCLUDE_NP)
|
||||||
|
#undef PTW32_LEVEL
|
||||||
|
#define PTW32_LEVEL 2
|
||||||
|
/* Include Non-Portable extensions */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PTW32_LEVEL_MAX 3
|
||||||
|
|
||||||
|
#if !defined(PTW32_LEVEL)
|
||||||
|
#define PTW32_LEVEL PTW32_LEVEL_MAX
|
||||||
|
/* Include everything */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __GNUC__ && ! defined (__declspec)
|
||||||
|
# error Please upgrade your GNU compiler to one that supports __declspec.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When building the DLL code, you should define PTW32_BUILD so that
|
||||||
|
* the variables/functions are exported correctly. When using the DLL,
|
||||||
|
* do NOT define PTW32_BUILD, and then the variables/functions will
|
||||||
|
* be imported correctly.
|
||||||
|
*/
|
||||||
|
#ifndef PTW32_STATIC_LIB
|
||||||
|
# ifdef PTW32_BUILD
|
||||||
|
# define PTW32_DLLPORT __declspec (dllexport)
|
||||||
|
# else
|
||||||
|
# define PTW32_DLLPORT __declspec (dllimport)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define PTW32_DLLPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is a duplicate of what is in the autoconf config.h,
|
||||||
|
* which is only used when building the pthread-win32 libraries.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PTW32_CONFIG_H
|
||||||
|
# if defined(WINCE)
|
||||||
|
# define NEED_ERRNO
|
||||||
|
# define NEED_SEM
|
||||||
|
# endif
|
||||||
|
# if defined(_UWIN) || defined(__MINGW32__)
|
||||||
|
# define HAVE_MODE_T
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if PTW32_LEVEL >= PTW32_LEVEL_MAX
|
||||||
|
#ifdef NEED_ERRNO
|
||||||
|
#include "need_errno.h"
|
||||||
|
#else
|
||||||
|
#include <errno.h>
|
||||||
|
#endif
|
||||||
|
#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
|
||||||
|
|
||||||
|
#define _POSIX_SEMAPHORES
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#ifndef HAVE_MODE_T
|
||||||
|
typedef unsigned int mode_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct sem_t_ * sem_t;
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sem_init (sem_t * sem,
|
||||||
|
int pshared,
|
||||||
|
unsigned int value);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sem_destroy (sem_t * sem);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sem_trywait (sem_t * sem);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sem_wait (sem_t * sem);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sem_timedwait (sem_t * sem,
|
||||||
|
const struct timespec * abstime);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sem_post (sem_t * sem);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sem_post_multiple (sem_t * sem,
|
||||||
|
int count);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sem_open (const char * name,
|
||||||
|
int oflag,
|
||||||
|
mode_t mode,
|
||||||
|
unsigned int value);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sem_close (sem_t * sem);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sem_unlink (const char * name);
|
||||||
|
|
||||||
|
PTW32_DLLPORT int __cdecl sem_getvalue (sem_t * sem,
|
||||||
|
int * sval);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* End of extern "C" */
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#undef PTW32_LEVEL
|
||||||
|
#undef PTW32_LEVEL_MAX
|
||||||
|
|
||||||
|
#endif /* !SEMAPHORE_H */
|
||||||
66
msvc_extra_headers/ardourext/sys/targetsxs.h.input
Normal file
66
msvc_extra_headers/ardourext/sys/targetsxs.h.input
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
#ifndef _TARGETSXS_H_
|
||||||
|
#define _TARGETSXS_H_
|
||||||
|
|
||||||
|
#pragma warning( disable : 4996 )
|
||||||
|
|
||||||
|
#ifndef HAVE_LV2
|
||||||
|
#define HAVE_SUIL
|
||||||
|
#define HAVE_LV2
|
||||||
|
/* Comment out the above lines to build Mixbus without LV2 support */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef VST_SUPPORT
|
||||||
|
#define VST_SUPPORT
|
||||||
|
/* Comment out the above line to build Mixbus without VST support */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JACK_32_64
|
||||||
|
#define JACK_32_64
|
||||||
|
/* Shouldn't really be needed but make sure that any structs we
|
||||||
|
obtain from libjack will have 1-byte packing alignment where
|
||||||
|
necessary (belt & braces approach to be on the safe side) */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#define _SECURE_SCL 1
|
||||||
|
#define _HAS_ITERATOR_DEBUGGING 1
|
||||||
|
/* #define to zero for a more conventional Debug build */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __midl
|
||||||
|
#if defined(_DEBUG) || defined (DEBUG)
|
||||||
|
/* Experimental - link to the lowest DebugCRT so we can run on another system */
|
||||||
|
#define _SXS_ASSEMBLY_VERSION "8.0.50727.42"
|
||||||
|
#else
|
||||||
|
#define _SXS_ASSEMBLY_VERSION "8.0.50727.6195"
|
||||||
|
#endif
|
||||||
|
#define _CRT_ASSEMBLY_VERSION _SXS_ASSEMBLY_VERSION
|
||||||
|
#define _MFC_ASSEMBLY_VERSION _SXS_ASSEMBLY_VERSION
|
||||||
|
#define _ATL_ASSEMBLY_VERSION _SXS_ASSEMBLY_VERSION
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
__declspec(selectany) int _forceCRTManifest;
|
||||||
|
__declspec(selectany) int _forceMFCManifest;
|
||||||
|
__declspec(selectany) int _forceAtlDllManifest;
|
||||||
|
__declspec(selectany) int _forceCRTManifestRTM;
|
||||||
|
__declspec(selectany) int _forceMFCManifestRTM;
|
||||||
|
__declspec(selectany) int _forceAtlDllManifestRTM;
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* 'stdint.h' conflicts with various other libraries so
|
||||||
|
let's #include stdint.h first to ensure one consistent
|
||||||
|
implementation for commonly used integer types. */
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#if (BUILDING_ARDOUR)
|
||||||
|
#if defined(_MSC_VER) && !defined(__MINGW__) && !defined(__MINGW32__)
|
||||||
|
#include <ardourext/misc.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /*_TARGETSXS_H_*/
|
||||||
110
msvc_extra_headers/ardourext/sys/time.h.input
Normal file
110
msvc_extra_headers/ardourext/sys/time.h.input
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
#ifndef _WINX_SYS_TIME_H_
|
||||||
|
#define _WINX_SYS_TIME_H_
|
||||||
|
|
||||||
|
//#include <features.h>
|
||||||
|
#include <WinSock.h> // gets 'struct timeval'
|
||||||
|
|
||||||
|
#ifdef _TIMEVAL_DEFINED
|
||||||
|
# define _STRUCT_TIMEVAL 1
|
||||||
|
#endif /* _TIMEVAL_DEFINED */
|
||||||
|
//#include <bits/types.h>
|
||||||
|
#define __need_time_t
|
||||||
|
#include <time.h>
|
||||||
|
#define __need_timeval
|
||||||
|
//#include <bits/time.h>
|
||||||
|
|
||||||
|
#ifdef _TIMEVAL_DEFINED /* also in winsock[2].h */
|
||||||
|
# undef __TIMEVAL__
|
||||||
|
# define __TIMEVAL__ 1
|
||||||
|
# undef _STRUCT_TIMEVAL
|
||||||
|
# define _STRUCT_TIMEVAL 1
|
||||||
|
#endif /* _TIMEVAL_DEFINED */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __USE_GNU
|
||||||
|
/* Macros for converting between `struct timeval' and `struct timespec'. */
|
||||||
|
# define TIMEVAL_TO_TIMESPEC(tv, ts) { \
|
||||||
|
(ts)->tv_sec = (tv)->tv_sec; \
|
||||||
|
(ts)->tv_nsec = (tv)->tv_usec * 1000; \
|
||||||
|
}
|
||||||
|
# define TIMESPEC_TO_TIMEVAL(tv, ts) { \
|
||||||
|
(tv)->tv_sec = (ts)->tv_sec; \
|
||||||
|
(tv)->tv_usec = (ts)->tv_nsec / 1000; \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __USE_BSD
|
||||||
|
/* Structure crudely representing a timezone.
|
||||||
|
This is obsolete and should never be used. */
|
||||||
|
struct timezone
|
||||||
|
{
|
||||||
|
int tz_minuteswest; /* Minutes west of GMT. */
|
||||||
|
int tz_dsttime; /* Nonzero if DST is ever in effect. */
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct timezone *__restrict __timezone_ptr_t;
|
||||||
|
#else
|
||||||
|
typedef void *__restrict __timezone_ptr_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Get the current time of day and timezone information,
|
||||||
|
putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
|
||||||
|
Returns 0 on success, -1 on errors.
|
||||||
|
NOTE: This form of timezone information is obsolete.
|
||||||
|
Use the functions and variables declared in <time.h> instead. */
|
||||||
|
extern int gettimeofday (struct timeval *__restrict __tv,
|
||||||
|
__timezone_ptr_t __tz) __THROW;
|
||||||
|
|
||||||
|
extern int getntptimeofday (struct timespec *__restrict __tp,
|
||||||
|
__timezone_ptr_t __tz) __THROW;
|
||||||
|
|
||||||
|
#ifdef __USE_BSD
|
||||||
|
/* Set the current time of day and timezone information.
|
||||||
|
This call is restricted to the super-user. */
|
||||||
|
extern int settimeofday (__const struct timeval *__tv,
|
||||||
|
__const struct timezone *__tz) __THROW;
|
||||||
|
extern int setntptimeofday (__const struct timespec *__tp,
|
||||||
|
__const struct timezone *__tz) __THROW;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
///* Values for the first argument to `getitimer' and `setitimer'. */
|
||||||
|
//enum __itimer_which
|
||||||
|
// {
|
||||||
|
// /* Timers run in real time. */
|
||||||
|
// ITIMER_REAL = 0,
|
||||||
|
//#define ITIMER_REAL ITIMER_REAL
|
||||||
|
// /* Timers run only when the process is executing. */
|
||||||
|
// ITIMER_VIRTUAL = 1,
|
||||||
|
//#define ITIMER_VIRTUAL ITIMER_VIRTUAL
|
||||||
|
// /* Timers run when the process is executing and when
|
||||||
|
// the system is executing on behalf of the process. */
|
||||||
|
// ITIMER_PROF = 2
|
||||||
|
//#define ITIMER_PROF ITIMER_PROF
|
||||||
|
// };
|
||||||
|
|
||||||
|
/* Type of the second argument to `getitimer' and
|
||||||
|
the second and third arguments `setitimer'. */
|
||||||
|
struct itimerval
|
||||||
|
{
|
||||||
|
/* Value to put into `it_value' when the timer expires. */
|
||||||
|
struct timeval it_interval;
|
||||||
|
/* Time to the next timer expiration. */
|
||||||
|
struct timeval it_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined __USE_GNU && !defined __cplusplus
|
||||||
|
/* Use the nicer parameter type only in GNU mode and not for C++ since the
|
||||||
|
strict C++ rules prevent the automatic promotion. */
|
||||||
|
typedef enum __itimer_which __itimer_which_t;
|
||||||
|
#else
|
||||||
|
typedef int __itimer_which_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /*_WINX_SYS_TIMEX_H_*/
|
||||||
Loading…
Add table
Add a link
Reference in a new issue