Skip to content

Commit

Permalink
Fix inconsistent case for OS_* macros (Refs pull request OpenMathLib#111
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zchothia committed May 22, 2012
1 parent 3394103 commit a431042
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions c_check
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ $compiler = DEC if ($data =~ /COMPILER_DEC/);
$compiler = GCC if ($compiler eq "");

$os = Linux if ($data =~ /OS_LINUX/);
$os = FreeBSD if ($data =~ /OS_FreeBSD/);
$os = NetBSD if ($data =~ /OS_NetBSD/);
$os = Darwin if ($data =~ /OS_Darwin/);
$os = SunOS if ($data =~ /OS_SunOS/);
$os = FreeBSD if ($data =~ /OS_FREEBSD/);
$os = NetBSD if ($data =~ /OS_NETBSD/);
$os = Darwin if ($data =~ /OS_DARWIN/);
$os = SunOS if ($data =~ /OS_SUNOS/);
$os = AIX if ($data =~ /OS_AIX/);
$os = osf if ($data =~ /OS_OSF/);
$os = WINNT if ($data =~ /OS_WINNT/);
Expand Down
2 changes: 1 addition & 1 deletion common.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extern "C" {
#define SMP
#endif

#if defined(OS_WINNT) || defined(OS_CYGWIN_NT) || defined(OS_Interix)
#if defined(OS_WINNT) || defined(OS_CYGWIN_NT) || defined(OS_INTERIX)
#define WINDOWS_ABI
#define OS_WINDOWS

Expand Down
2 changes: 1 addition & 1 deletion common_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
#define EPILOGUE .end REALNAME
#endif

#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NetBSD) || defined(__ELF__)
#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(__ELF__)
#define PROLOGUE \
.text; \
.align 16; \
Expand Down
2 changes: 1 addition & 1 deletion common_x86_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
#define EPILOGUE .end REALNAME
#endif

#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NetBSD) || defined(__ELF__) || defined(C_PGI)
#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(__ELF__) || defined(C_PGI)
#define PROLOGUE \
.text; \
.align 512; \
Expand Down
8 changes: 4 additions & 4 deletions ctest.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ OS_LINUX
#endif

#if defined(__FreeBSD__)
OS_FreeBSD
OS_FREEBSD
#endif

#if defined(__NetBSD__)
OS_NetBSD
OS_NETBSD
#endif

#if defined(__sun)
OS_SunOS
OS_SUNOS
#endif

#if defined(__APPLE__)
OS_Darwin
OS_DARWIN
#endif

#if defined(_AIX)
Expand Down
10 changes: 5 additions & 5 deletions driver/others/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <sys/syscall.h>
#endif

#if defined(OS_FREEBSD) || defined(OS_Darwin)
#if defined(OS_FREEBSD) || defined(OS_DARWIN)
#include <sys/sysctl.h>
#endif

Expand Down Expand Up @@ -185,7 +185,7 @@ int get_num_procs(void) {

#endif

#if defined(OS_FREEBSD) || defined(OS_Darwin)
#if defined(OS_FREEBSD) || defined(OS_DARWIN)

int get_num_procs(void) {

Expand Down Expand Up @@ -215,15 +215,15 @@ int goto_get_num_procs (void) {

int blas_get_cpu_number(void){
char *p;
#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FREEBSD) || defined(OS_Darwin)
#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FREEBSD) || defined(OS_DARWIN)
int max_num;
#endif
int blas_goto_num = 0;
int blas_omp_num = 0;

if (blas_num_threads) return blas_num_threads;

#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FREEBSD) || defined(OS_Darwin)
#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FREEBSD) || defined(OS_DARWIN)
max_num = get_num_procs();
#endif

Expand All @@ -250,7 +250,7 @@ int blas_get_cpu_number(void){
else if (blas_omp_num > 0) blas_num_threads = blas_omp_num;
else blas_num_threads = MAX_CPU_NUMBER;

#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FREEBSD) || defined(OS_Darwin)
#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FREEBSD) || defined(OS_DARWIN)
if (blas_num_threads > max_num) blas_num_threads = max_num;
#endif

Expand Down

0 comments on commit a431042

Please sign in to comment.