Changeset 18060 for gsdl


Ignore:
Timestamp:
2008-12-04T12:15:04+13:00 (15 years ago)
Author:
mdewsnip
Message:

Transferred Windows-specific customisations from the old GDBM package in common-src\packages\windows\gdbm\gdbm.

Location:
gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/gdbmreorg.c

    r18019 r18060  
    164164  /* Move the new file to old name. */
    165165
     166#ifdef MSDOS
     167  if (close (new_dbf->desc)
     168      || unlink (dbf->name)
     169      || rename (new_name, dbf->name)
     170      || (new_dbf->desc = open (dbf->name, O_RDWR|O_BINARY)) < 0)
     171#else /* not MSDOS */
    166172  if (rename (new_name, dbf->name) != 0)
     173#endif /* not MSDOS */
    167174    {
    168175      gdbm_errno = GDBM_REORGANIZE_FAILED;
  • gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/systems.h

    r18019 r18060  
    8686#else
    8787
     88#ifdef MSDOS
     89#define MY_UNLOCK    0
     90#define MY_READLOCK  1
     91#define MY_WRITELOCK 2
     92int my_locking(int fh, int lmode, long lockoffset, long nbytes);
     93
     94#define UNLOCK_FILE(dbf)    my_locking(dbf->desc,MY_UNLOCK,0,10)
     95#define READLOCK_FILE(dbf)  lock_val=my_locking(dbf->desc,MY_READLOCK,0,10)
     96#define WRITELOCK_FILE(dbf) lock_val=my_locking(dbf->desc,MY_WRITELOCK,0,10)
     97
     98#else
     99
    88100/* Assume it is done like System V. */
    89101
     
    113125    }
    114126#endif
     127#endif
    115128
    116129/* Do we have bcopy?  */
     
    125138/* Do we have fsync? */
    126139#if !HAVE_FSYNC
     140#ifdef MSDOS
     141#define fsync(f)
     142#else
    127143#define fsync(f) {sync(); sync();}
     144#endif
    128145#endif
    129146
  • gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/windows/autoconf.h

    r18058 r18060  
    11/* autoconf.h.in.  Generated from configure.in by autoheader.  */
     2
     3#define MSDOS
    24
    35/* Define to 1 if you have the `bcopy' function. */
     
    1113
    1214/* Define to 1 if you have the `flock' function. */
    13 #define HAVE_FLOCK 1
     15#undef HAVE_FLOCK
    1416
    1517/* Define to 1 if you have the `fsync' function. */
Note: See TracChangeset for help on using the changeset viewer.