Changeset 3240b1 in git


Ignore:
Timestamp:
Mar 16, 2018, 4:52:53 PM (6 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '79dfb9a6d258bfeb991428bdb25b8f55e9e809b2')
Children:
f06d39e9bdc593f9c26fdcd72fc94f82f99bda04
Parents:
73248dff324d8c70a6ab8f0c380adc042b042dec
Message:
port: (cygwin) L_SET (old bsd) -> SEEK_SET (posix) for lseek
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/links/ndbm.cc

    r73248d r3240b1  
    3636* #   define ENOMEM 23
    3737* #   define ENOSPC 28
    38 * #   define L_SET SEEK_SET
    3938*/
    4039#include <errno.h>
     
    156155    goto err;
    157156  db->dbm_pagbno = db->dbm_blkno;
    158   (void) lseek(db->dbm_pagf, db->dbm_blkno*PBLKSIZ, L_SET);
     157  (void) lseek(db->dbm_pagf, db->dbm_blkno*PBLKSIZ, SEEK_SET);
    159158  if (si_write(db->dbm_pagf, db->dbm_pagbuf, PBLKSIZ) != PBLKSIZ)
    160159  {
     
    196195    goto split;
    197196  db->dbm_pagbno = db->dbm_blkno;
    198   (void) lseek(db->dbm_pagf, db->dbm_blkno*PBLKSIZ, L_SET);
     197  (void) lseek(db->dbm_pagf, db->dbm_blkno*PBLKSIZ, SEEK_SET);
    199198  if ( (ret=si_write(db->dbm_pagf, db->dbm_pagbuf, PBLKSIZ)) != PBLKSIZ)
    200199  {
     
    235234  }
    236235  db->dbm_pagbno = db->dbm_blkno;
    237   (void) lseek(db->dbm_pagf, db->dbm_blkno*PBLKSIZ, L_SET);
     236  (void) lseek(db->dbm_pagf, db->dbm_blkno*PBLKSIZ, SEEK_SET);
    238237  if (si_write(db->dbm_pagf, db->dbm_pagbuf, PBLKSIZ) != PBLKSIZ)
    239238  {
     
    241240    return (-1);
    242241  }
    243   (void) lseek(db->dbm_pagf, (db->dbm_blkno+db->dbm_hmask+1)*PBLKSIZ, L_SET);
     242  (void) lseek(db->dbm_pagf, (db->dbm_blkno+db->dbm_hmask+1)*PBLKSIZ, SEEK_SET);
    244243  if (si_write(db->dbm_pagf, ovfbuf, PBLKSIZ) != PBLKSIZ)
    245244  {
     
    274273    {
    275274      db->dbm_pagbno = db->dbm_blkptr;
    276       (void) lseek(db->dbm_pagf, db->dbm_blkptr*PBLKSIZ, L_SET);
     275      (void) lseek(db->dbm_pagf, db->dbm_blkptr*PBLKSIZ, SEEK_SET);
    277276      if (si_read(db->dbm_pagf, db->dbm_pagbuf, PBLKSIZ) != PBLKSIZ)
    278277        memset(db->dbm_pagbuf, 0, PBLKSIZ);
     
    313312  {
    314313    db->dbm_pagbno = db->dbm_blkno;
    315     (void) lseek(db->dbm_pagf, db->dbm_blkno*PBLKSIZ, L_SET);
     314    (void) lseek(db->dbm_pagf, db->dbm_blkno*PBLKSIZ, SEEK_SET);
    316315    if (si_read(db->dbm_pagf, db->dbm_pagbuf, PBLKSIZ) != PBLKSIZ)
    317316      memset(db->dbm_pagbuf, 0, PBLKSIZ);
     
    338337  {
    339338    db->dbm_dirbno = b;
    340     (void) lseek(db->dbm_dirf, (long)b*DBLKSIZ, L_SET);
     339    (void) lseek(db->dbm_dirf, (long)b*DBLKSIZ, SEEK_SET);
    341340    if (si_read(db->dbm_dirf, db->dbm_dirbuf, DBLKSIZ) != DBLKSIZ)
    342341      memset(db->dbm_dirbuf, 0, DBLKSIZ);
     
    359358  {
    360359    db->dbm_dirbno = b;
    361     (void) lseek(db->dbm_dirf, (long)b*DBLKSIZ, L_SET);
     360    (void) lseek(db->dbm_dirf, (long)b*DBLKSIZ, SEEK_SET);
    362361    if (si_read(db->dbm_dirf, db->dbm_dirbuf, DBLKSIZ) != DBLKSIZ)
    363362      memset(db->dbm_dirbuf, 0, DBLKSIZ);
     
    365364  db->dbm_dirbuf[i] |= 1<<n;
    366365  db->dbm_dirbno = b;
    367   (void) lseek(db->dbm_dirf, (long)b*DBLKSIZ, L_SET);
     366  (void) lseek(db->dbm_dirf, (long)b*DBLKSIZ, SEEK_SET);
    368367  if (si_write(db->dbm_dirf, db->dbm_dirbuf, DBLKSIZ) != DBLKSIZ)
    369368    db->dbm_flags |= _DBM_IOERR;
Note: See TracChangeset for help on using the changeset viewer.