Skip to content

Commit

Permalink
Well that was embarassing. Fix the WIN32 version of AtomicIncrement a…
Browse files Browse the repository at this point in the history
…nd AtomicDecrement.

git-svn-id: http://audiere.svn.sourceforge.net/svnroot/audiere/trunk@680 cb5fa4c3-b70d-0410-b4f6-90f5898e5689
  • Loading branch information
aegis committed Apr 20, 2007
1 parent 27c2b78 commit cf40fc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Expand Up @@ -26,7 +26,7 @@ env.Append(CPPPATH=["#/src"])
if env['CC'] == 'cl':
env.Append(CCFLAGS=['/EHsc', '/Z7', '/O2', '/W3'],
LINKFLAGS=['/DEBUG'],
CPPDEFINES=['AUDIERE_EXPORTS', 'NOMINMAX', 'FLAC__NO_DLL', '_CRT_SECURE_NO_WARNINGS'],
CPPDEFINES=['AUDIERE_EXPORTS', 'NOMINMAX', 'FLAC__NO_DLL', '_CRT_SECURE_NO_WARNINGS', 'WIN32'],
CPPPATH=['#/third-party/vc6/include'],
LIBPATH=['#/third-party/vc6/lib'],
LIBS=['user32', 'ole32', 'rpcrt4', 'winmm'])
Expand Down
7 changes: 5 additions & 2 deletions src/utility.cpp
Expand Up @@ -2,6 +2,9 @@
#pragma warning(disable : 4786)
#endif

#ifdef WIN32
#include <windows.h>
#endif

#include <ctype.h>
#include "utility.h"
Expand Down Expand Up @@ -89,12 +92,12 @@ namespace audiere {
#ifdef WIN32

ADR_EXPORT(long) AdrAtomicIncrement(volatile long& var) {
return InterlockedIncrement(var);
return InterlockedIncrement(&var);

}

ADR_EXPORT(long) AdrAtomicDecrement(volatile long& var) {
return InterlockedDecrement(*var);
return InterlockedDecrement(&var);
}

#else
Expand Down

0 comments on commit cf40fc1

Please sign in to comment.