Changeset 3ff334 in git
- Timestamp:
- Apr 9, 1998, 1:47:13 PM (25 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- e0bce7d14f8856bbd5f033cdbdad34575973fc57
- Parents:
- bf2cb0afbd85758686649544bac7e2f6dd6abc9f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ndbm.cc
rbf2cb0 r3ff334 5 5 //**************************************************************************/ 6 6 // 7 // $Id: ndbm.cc,v 1. 8 1998-01-27 15:34:08pohl Exp $7 // $Id: ndbm.cc,v 1.9 1998-04-09 11:47:13 pohl Exp $ 8 8 // 9 9 //**************************************************************************/ … … 30 30 31 31 #include <stdio.h> 32 #ifdef __MWERKS__ 33 # define bcopy(a,b,c) memmove(b,a,c) 34 # define EPERM 1 35 # define ENOMEM 23 36 # define ENOSPC 28 37 # define L_SET SEEK_SET 32 38 #ifdef macintosh 33 39 # include <stdlib.h> … … 36 42 # include <string.h> 37 43 # include <stat.h> 38 # define L_SET SEEK_SET 39 # define EPERM 140 # define ENOSPC 2841 # define ENOMEM 2342 # define bcopy(a,b,c) memmove(b,a,c)43 #else /* not macintosh */44 //# include <stat.h> 45 #else 46 # include <unix.h> 47 # include <ThreadLocalData.h> 48 #endif 49 #else 44 50 # include <sys/types.h> 45 51 # include <sys/stat.h> … … 50 56 # include <unistd.h> 51 57 # include <fcntl.h> 52 #endif /* macintosh */58 #endif 53 59 #ifndef HAVE_BCOPY 54 60 # define bcopy(a,b,c) memmove(b,a,c) … … 68 74 static int delitem(char buf[PBLKSIZ], int n); 69 75 static int additem(char buf[PBLKSIZ], datum item, datum item1); 76 #if defined(__MWERKS__) && ! defined(macintosh) 77 #define errno (_GetThreadLocalData()->errno) 78 #else 70 79 extern int errno; 71 80 #endif 72 81 73 82 DBM * … … 96 105 strcpy(db->dbm_pagbuf, file); 97 106 strcat(db->dbm_pagbuf, ".pag"); 98 #ifdef macintosh107 #ifdef __MWERKS__ 99 108 db->dbm_pagf = open(db->dbm_pagbuf, flags); 100 #else /* not macintosh*/109 #else /* not __MWERKS__ */ 101 110 db->dbm_pagf = open(db->dbm_pagbuf, flags, mode); 102 #endif /* macintosh*/111 #endif /* __MWERKS__ */ 103 112 if (db->dbm_pagf < 0) 104 113 goto bad; 105 114 strcpy(db->dbm_pagbuf, file); 106 115 strcat(db->dbm_pagbuf, ".dir"); 107 #ifdef macintosh116 #ifdef __MWERKS__ 108 117 db->dbm_dirf = open(db->dbm_pagbuf, flags); 109 #else /* not macintosh*/118 #else /* not __MWERKS__ */ 110 119 db->dbm_dirf = open(db->dbm_pagbuf, flags, mode); 111 #endif /* macintosh*/120 #endif /* __MWERKS__ */ 112 121 if (db->dbm_dirf < 0) 113 122 goto bad1;
Note: See TracChangeset
for help on using the changeset viewer.