Skip to content

Commit 979aa05

Browse files
committed
Merge remote-tracking branch 'origin/v10-minor'
2 parents ab7676e + 0d0f03e commit 979aa05

25 files changed

+43
-53
lines changed

src/lpi/lpi_clp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
#include "scip/pub_message.h"
8989

9090
/* do defines for windows directly her to make the lpi more independent*/
91-
#if defined(_WIN32) || defined(_WIN64)
91+
#ifdef _WIN32
9292
#define snprintf _snprintf
9393
#endif
9494

src/lpi/lpi_msk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#include "tinycthread/tinycthread.h"
5454

5555
/* do defines for windows directly here to make the lpi more independent */
56-
#if defined(_WIN32) || defined(_WIN64)
56+
#ifdef _WIN32
5757
#define snprintf _snprintf
5858
#endif
5959

src/scip/clock.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
3232

3333
#include <assert.h>
34-
#if defined(_WIN32) || defined(_WIN64)
34+
#ifdef _WIN32
3535
#include <windows.h>
3636
#else
3737
#include <sys/times.h>
@@ -56,7 +56,7 @@ SCIP_Real cputime2sec(
5656
{
5757
clock_t clocks_per_second;
5858

59-
#if defined(_WIN32) || defined(_WIN64)
59+
#ifdef _WIN32
6060
clocks_per_second = 100;
6161
#else
6262
#ifndef CLK_TCK
@@ -93,7 +93,7 @@ void sec2cputime(
9393

9494
assert(cputime != NULL);
9595

96-
#if defined(_WIN32) || defined(_WIN64)
96+
#ifdef _WIN32
9797
clocks_per_second = 100;
9898
#else
9999
#ifndef CLK_TCK
@@ -301,7 +301,7 @@ void SCIPclockStart(
301301

302302
if( clck->nruns == 0 )
303303
{
304-
#if defined(_WIN32) || defined(_WIN64)
304+
#ifdef _WIN32
305305
FILETIME creationtime;
306306
FILETIME exittime;
307307
FILETIME kerneltime;
@@ -316,7 +316,7 @@ void SCIPclockStart(
316316
switch( clck->clocktype )
317317
{
318318
case SCIP_CLOCKTYPE_CPU:
319-
#if defined(_WIN32) || defined(_WIN64)
319+
#ifdef _WIN32
320320
GetProcessTimes(GetCurrentProcess(), &creationtime, &exittime, &kerneltime, &usertime);
321321
clck->data.cpuclock.user -= usertime.dwHighDateTime * 42950 + usertime.dwLowDateTime / 100000L;
322322
#else
@@ -327,7 +327,7 @@ void SCIPclockStart(
327327
break;
328328

329329
case SCIP_CLOCKTYPE_WALL:
330-
#if defined(_WIN32) || defined(_WIN64)
330+
#ifdef _WIN32
331331
clck->data.wallclock.sec -= time(NULL);
332332
#else
333333
gettimeofday(&tp, NULL);
@@ -372,7 +372,7 @@ void SCIPclockStop(
372372
clck->nruns--;
373373
if( clck->nruns == 0 )
374374
{
375-
#if defined(_WIN32) || defined(_WIN64)
375+
#ifdef _WIN32
376376
FILETIME creationtime;
377377
FILETIME exittime;
378378
FILETIME kerneltime;
@@ -387,7 +387,7 @@ void SCIPclockStop(
387387
switch( clck->clocktype )
388388
{
389389
case SCIP_CLOCKTYPE_CPU:
390-
#if defined(_WIN32) || defined(_WIN64)
390+
#ifdef _WIN32
391391
GetProcessTimes(GetCurrentProcess(), &creationtime, &exittime, &kerneltime, &usertime);
392392
clck->data.cpuclock.user += usertime.dwHighDateTime * 42950 + usertime.dwLowDateTime / 100000L;
393393
#else
@@ -397,7 +397,7 @@ void SCIPclockStop(
397397
break;
398398

399399
case SCIP_CLOCKTYPE_WALL:
400-
#if defined(_WIN32) || defined(_WIN64)
400+
#ifdef _WIN32
401401
clck->data.wallclock.sec += time(NULL);
402402
#else
403403
gettimeofday(&tp, NULL);
@@ -471,7 +471,7 @@ SCIP_Real SCIPclockGetTime(
471471
}
472472
else
473473
{
474-
#if defined(_WIN32) || defined(_WIN64)
474+
#ifdef _WIN32
475475
FILETIME creationtime;
476476
FILETIME exittime;
477477
FILETIME kerneltime;
@@ -485,7 +485,7 @@ SCIP_Real SCIPclockGetTime(
485485
switch( clck->clocktype )
486486
{
487487
case SCIP_CLOCKTYPE_CPU:
488-
#if defined(_WIN32) || defined(_WIN64)
488+
#ifdef _WIN32
489489
GetProcessTimes(GetCurrentProcess(), &creationtime, &exittime, &kerneltime, &usertime);
490490
result = cputime2sec(clck->data.cpuclock.user + usertime.dwHighDateTime * 42950 + usertime.dwLowDateTime / 100000L);
491491
#else
@@ -494,7 +494,7 @@ SCIP_Real SCIPclockGetTime(
494494
#endif
495495
break;
496496
case SCIP_CLOCKTYPE_WALL:
497-
#if defined(_WIN32) || defined(_WIN64)
497+
#ifdef _WIN32
498498
result = walltime2sec(clck->data.wallclock.sec + time(NULL), 0);
499499
#else
500500
gettimeofday(&tp, NULL);
@@ -568,7 +568,7 @@ void SCIPclockSetTime(
568568

569569
if( clck->nruns >= 1 )
570570
{
571-
#if defined(_WIN32) || defined(_WIN64)
571+
#ifdef _WIN32
572572
FILETIME creationtime;
573573
FILETIME exittime;
574574
FILETIME kerneltime;
@@ -582,7 +582,7 @@ void SCIPclockSetTime(
582582
switch( clck->clocktype )
583583
{
584584
case SCIP_CLOCKTYPE_CPU:
585-
#if defined(_WIN32) || defined(_WIN64)
585+
#ifdef _WIN32
586586
GetProcessTimes(GetCurrentProcess(), &creationtime, &exittime, &kerneltime, &usertime);
587587
clck->data.cpuclock.user -= usertime.dwHighDateTime * 42950 + usertime.dwLowDateTime / 100000L;
588588
#else
@@ -592,7 +592,7 @@ void SCIPclockSetTime(
592592
break;
593593

594594
case SCIP_CLOCKTYPE_WALL:
595-
#if defined(_WIN32) || defined(_WIN64)
595+
#ifdef _WIN32
596596
clck->data.wallclock.sec -= time(NULL);
597597
#else
598598
gettimeofday(&tp, NULL);
@@ -622,7 +622,7 @@ SCIP_Real SCIPclockGetTimeOfDay(
622622
void
623623
)
624624
{
625-
#if defined(_WIN32) || defined(_WIN64)
625+
#ifdef _WIN32
626626
time_t now;
627627
now = time(NULL);
628628
return (SCIP_Real)(now % (24*3600));

src/scip/conflict_general.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@
9898
#include "scip/var.h"
9999
#include "scip/visual.h"
100100
#include <string.h>
101-
#if defined(_WIN32) || defined(_WIN64)
102-
#else
101+
#ifndef _WIN32
103102
#include <strings.h> /*lint --e{766}*/
104103
#endif
105104

src/scip/conflict_graphanalysis.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@
165165
#include "scip/var.h"
166166
#include "scip/visual.h"
167167
#include <string.h>
168-
#if defined(_WIN32) || defined(_WIN64)
169-
#else
168+
#ifndef _WIN32
170169
#include <strings.h> /*lint --e{766}*/
171170
#endif
172171

src/scip/conflict_graphanalysis.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@
142142
#include "scip/type_event.h"
143143
#include "scip/type_message.h"
144144
#include <string.h>
145-
#if defined(_WIN32) || defined(_WIN64)
146-
#else
145+
#ifndef _WIN32
147146
#include <strings.h> /*lint --e{766}*/
148147
#endif
149148

src/scip/conflict_resolution.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@
7979
#include "scip/var.h"
8080

8181
#include <string.h>
82-
#if defined(_WIN32) || defined(_WIN64)
83-
#else
82+
#ifndef _WIN32
8483
#include <strings.h> /*lint --e{766}*/
8584
#endif
8685

src/scip/cons_exactlinear.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@
7676
#include "scip/sepastoreexact.h"
7777
#include <ctype.h>
7878
#include <string.h>
79-
#if defined(_WIN32) || defined(_WIN64)
80-
#else
79+
#ifndef _WIN32
8180
#include <strings.h> /*lint --e{766}*/
8281
#endif
8382

src/scip/debug.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
#include <stdio.h>
3434
#include <string.h>
3535
#include <assert.h>
36-
#if defined(_WIN32) || defined(_WIN64)
37-
#else
36+
#ifndef _WIN32
3837
#include <strings.h> /*lint --e{766}*/
3938
#endif
4039

src/scip/misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ SCIP_Real SCIPerf(
161161
SCIP_Real x /**< value to evaluate */
162162
)
163163
{
164-
#if defined(_WIN32) || defined(_WIN64)
164+
#ifdef _WIN32
165165
SCIP_Real a1, a2, a3, a4, a5, p, t, y;
166166
int sign;
167167

@@ -10725,7 +10725,7 @@ void SCIPprintSysError(
1072510725
#else
1072610726
char buf[SCIP_MAXSTRLEN];
1072710727

10728-
#if defined(_WIN32) || defined(_WIN64)
10728+
#ifdef _WIN32
1072910729
/* strerror_s returns 0 on success; the string is \0 terminated. */
1073010730
if ( strerror_s(buf, SCIP_MAXSTRLEN, errno) != 0 )
1073110731
SCIPmessagePrintError("Unknown error number %d or error message too long.\n", errno);

0 commit comments

Comments
 (0)