Skip to content

Commit

Permalink
Cygwin support (#15)
Browse files Browse the repository at this point in the history
* Add .gitignore for most untracked files associated with automake

* Add include gards

* Add checks for CygWin to fix gaps in cygwin build. uint is not defined in CygWin and M_PI needs additional defines to expose.
  • Loading branch information
dgtlrift authored May 12, 2023
1 parent fe552ea commit 927abaf
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Makefile
Makefile.in
aclocal.m4
/autom4te.cache/
/config.*
/configure
/depcomp
/install-sh
/libtool
/ltmain.sh
/m4/
/missing
/stamp-h?
.deps/
.dirstamp
.libs/
*.l[ao]
*.o
*~
*.bak
4 changes: 3 additions & 1 deletion include/dieharder/copyright.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifndef _DIEHARDER_COPYRIGHT_H_
#define _DIEHARDER_COPYRIGHT_H_
/*
* $Id: copyright.h 222 2006-08-17 04:54:59Z rgb $
*
Expand All @@ -14,4 +16,4 @@
* PERFORMANCE OF THIS SOFTWARE.
*
*/

#endif /* _DIEHARDER_COPYRIGHT_H_ */
15 changes: 15 additions & 0 deletions include/dieharder/libdieharder.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef _LIBDIEHARDER_H_
#define _LIBDIEHARDER_H_

/*
*========================================================================
* See copyright in copyright.h and the accompanying file COPYING
Expand Down Expand Up @@ -26,7 +29,15 @@

/* This turns on M_PI in math.h */
#define __USE_BSD 1
#ifdef __CYGWIN__
#undef __BSD_VISIBLE
#define __BSD_VISIBLE 1
#endif /* __CYGWIN__ */
#include <math.h>
#ifdef __CYGWIN__
#undef __BSD_VISIBLE
#define __BSD_VISIBLE 0
#endif /* __CYGWIN__ */
#include <limits.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
Expand Down Expand Up @@ -301,3 +312,7 @@ typedef struct {
double c[RGB_MINIMUM_DISTANCE_MAXDIM];
} dTuple;

#ifdef __CYGWIN__
typedef unsigned int uint;
#endif /* __CYGWIN__ */
#endif /* _LIBDIEHARDER_H_ */

0 comments on commit 927abaf

Please sign in to comment.