Changeset 26650

Show
Ignore:
Timestamp:
10.01.2013 15:25:03 (6 years ago)
Author:
davidb
Message:

Code changed from using WIN32 use to _MSC_VER (the difference being the former is set for any Windows based compiler, whilst the latter is specifically set by a MicroSoft? Visual Studio compiler). Up to this point the difference was not important, however to allow for cross-compilation (using mingw under Linux to produce native Windows binaries) the difference is imporant, and needs to be used more carefully

Location:
main/trunk/greenstone2/common-src/src/gdbmedit
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/src/gdbmedit/db2txt/db2txt.cpp

    r22039 r26650  
    2424 *********************************************************************/ 
    2525 
    26 #ifdef __WIN32__ 
     26#ifdef _MSC_VER 
    2727#include "autoconf.h" 
    2828#include "systems.h" 
     
    7171   
    7272  // open the database 
    73 #ifdef __WIN32__ 
     73#ifdef _MSC_VER 
    7474  dbf = gdbm_open (argv[1], block_size, GDBM_READER, 00664, NULL, 0); 
    7575#else 
  • main/trunk/greenstone2/common-src/src/gdbmedit/gdbmdel/gdbmdel.cpp

    r18880 r26650  
    2424 *********************************************************************/ 
    2525 
    26 #ifdef __WIN32__ 
     26#ifdef _MSC_VER 
    2727#include "autoconf.h" 
    2828#include "systems.h" 
     
    7777   
    7878  // open the database 
    79 #ifdef __WIN32__ 
     79#ifdef _MSC_VER 
    8080  dbf = gdbm_open (argv[1], block_size, GDBM_WRCREAT, 00664, NULL, 1); 
    8181#else 
  • main/trunk/greenstone2/common-src/src/gdbmedit/gdbmget/gdbmget.cpp

    r22039 r26650  
    2424 *********************************************************************/ 
    2525 
    26 #ifdef __WIN32__ 
     26#ifdef _MSC_VER 
    2727#include "autoconf.h" 
    2828#include "systems.h" 
     
    7777   
    7878  // open the database 
    79 #ifdef __WIN32__ 
     79#ifdef _MSC_VER 
    8080  dbf = gdbm_open (argv[1], block_size, GDBM_READER, 00664, NULL, 0); 
    8181#else 
  • main/trunk/greenstone2/common-src/src/gdbmedit/gdbmkeys/gdbmkeys.cpp

    r18469 r26650  
    2424 *********************************************************************/ 
    2525 
    26 #ifdef __WIN32__ 
     26#ifdef _MSC_VER 
    2727#include "autoconf.h" 
    2828#include "systems.h" 
     
    7676   
    7777  // open the database 
    78 #ifdef __WIN32__ 
     78#ifdef _MSC_VER 
    7979  dbf = gdbm_open (argv[1], block_size, GDBM_READER, 00664, NULL, 0); 
    8080#else 
  • main/trunk/greenstone2/common-src/src/gdbmedit/gdbmset/gdbmset.cpp

    r22039 r26650  
    2424 *********************************************************************/ 
    2525 
    26 #ifdef __WIN32__ 
     26#ifdef _MSC_VER 
    2727#include "autoconf.h" 
    2828#include "systems.h" 
     
    8181   
    8282  // open the database 
    83 #ifdef __WIN32__ 
     83#ifdef _MSC_VER 
    8484  // On Windows need to make sure the database is generated if it does not already exist 
    8585  // GDBM_WRCREAT flag means: open database for read/write, create if necessary 
  • main/trunk/greenstone2/common-src/src/gdbmedit/txt2db/txt2db.cpp

    r23136 r26650  
    2525 
    2626 
    27 #ifdef __WIN32__ 
     27#ifdef _MSC_VER 
    2828#include "autoconf.h" 
    2929#include "systems.h" 
     
    9595  if (append) read_write = GDBM_WRCREAT | GDBM_FAST; 
    9696   
    97 #ifdef __WIN32__ 
     97#ifdef _MSC_VER 
    9898  dbf = gdbm_open (dbname, block_size, read_write, 00664, NULL, 1); 
    9999#else