Ignore:
Timestamp:
2010-06-12T23:33:27+12:00 (14 years ago)
Author:
davidb
Message:

Tie Makefile and source code in with -DMSDOS so MinGW/MSys compilation works with GDBM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/packages/gdbm/gdbm-1.8.3/dbminit.c

    r18019 r22259  
    7676
    7777  /* Try to open the file as a writer.  DBM never created a file. */
     78#ifdef MSDOS
     79  /* Not clear if final argument for Windows should be to obtain a
     80     file lock or not.  Play it safe for now and ask for a lock
     81  */
     82  _gdbm_file = gdbm_open (pag_file, 0, GDBM_WRITER, 0, NULL, TRUE);
     83#else
    7884  _gdbm_file = gdbm_open (pag_file, 0, GDBM_WRITER, 0, NULL);
     85#endif
    7986
    8087  /* If it was not opened, try opening it as a reader. */
    8188  if (_gdbm_file == NULL)
    8289    {
     90#ifdef MSDOS
     91      _gdbm_file = gdbm_open (pag_file, 0, GDBM_READER, 0, NULL, TRUE);
     92#else
    8393      _gdbm_file = gdbm_open (pag_file, 0, GDBM_READER, 0, NULL);
    84  
     94#endif 
    8595      /* Did we successfully open the file? */
    8696      if (_gdbm_file == NULL)
Note: See TracChangeset for help on using the changeset viewer.