Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
e3560904
Commit
e3560904
authored
Nov 05, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Plain Diff
Merged in atomb/abc (pull request #1)
Several patches to fix compilation under MINGW32
parents
053c9f54
aa2eae5c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
src/misc/util/abc_global.h
+3
-1
src/misc/util/utilFile.c
+3
-3
No files found.
src/misc/util/abc_global.h
View file @
e3560904
...
...
@@ -26,6 +26,7 @@
////////////////////////////////////////////////////////////////////////
#ifdef _WIN32
#ifndef __MINGW32__
#define inline __inline // compatible with MS VS 6.0
#pragma warning(disable : 4152) // warning C4152: nonstandard extension, function/data pointer conversion in expression
#pragma warning(disable : 4200) // warning C4200: nonstandard extension used : zero-sized array in struct/union
...
...
@@ -34,6 +35,7 @@
#pragma warning(disable : 4710) // warning C4710: function 'Vec_PtrGrow' not inlined
//#pragma warning( disable : 4273 )
#endif
#endif
#ifdef WIN32
#ifdef WIN32_NO_DLL
...
...
@@ -272,7 +274,7 @@ static inline int Abc_Lit2LitL( int * pMap, int Lit ) { return Abc_LitNo
typedef
ABC_INT64_T
abctime
;
static
inline
abctime
Abc_Clock
()
{
#if
defined(LIN) || defined(LIN64) && !(__APPLE__ & __MACH
__)
#if
(defined(LIN) || defined(LIN64) && !(__APPLE__ & __MACH__)) && !defined(__MINGW32
__)
struct
timespec
ts
;
if
(
clock_gettime
(
CLOCK_THREAD_CPUTIME_ID
,
&
ts
)
<
0
)
return
(
abctime
)
-
1
;
...
...
src/misc/util/utilFile.c
View file @
e3560904
...
...
@@ -25,7 +25,7 @@
#include <fcntl.h>
#include <sys/stat.h>
#if defined(_MSC_VER)
#if defined(_MSC_VER)
|| defined(__MINGW32__)
#include <Windows.h>
#include <process.h>
#include <io.h>
...
...
@@ -88,7 +88,7 @@ static ABC_UINT64_T realTimeAbs() // -- absolute time in nano-seconds
***********************************************************************/
int
tmpFile
(
const
char
*
prefix
,
const
char
*
suffix
,
char
**
out_name
)
{
#if defined(_MSC_VER)
#if defined(_MSC_VER)
|| defined(__MINGW32__)
int
i
,
fd
;
*
out_name
=
(
char
*
)
malloc
(
strlen
(
prefix
)
+
strlen
(
suffix
)
+
27
);
for
(
i
=
0
;
i
<
10
;
i
++
){
...
...
@@ -174,7 +174,7 @@ char* vnsprintf(const char* format, va_list args)
static
FILE
*
dummy_file
=
NULL
;
if
(
!
dummy_file
)
{
#if !defined(_MSC_VER)
#if !defined(_MSC_VER)
&& !defined(__MINGW32)
dummy_file
=
fopen
(
"/dev/null"
,
"wb"
);
#else
dummy_file
=
fopen
(
"NUL"
,
"wb"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment