comparison src/database.c @ 4824:c12b646d84ee

changes to get things to compile under latest cygwin
author Ben Wing <ben@xemacs.org>
date Thu, 24 Dec 2009 19:45:23 -0600
parents 0e1461b592ce
children 493e2aa349fd d877c14318b3
comparison
equal deleted inserted replaced
4785:d6cfba1cc388 4824:c12b646d84ee
83 Lisp_Object Qqueue; 83 Lisp_Object Qqueue;
84 #endif 84 #endif
85 #endif /* HAVE_BERKELEY_DB */ 85 #endif /* HAVE_BERKELEY_DB */
86 86
87 #ifdef HAVE_DBM 87 #ifdef HAVE_DBM
88 #if defined (CYGWIN) || defined (MINGW)
89
90 #if defined(__cplusplus) || defined(c_plusplus)
91 extern "C" {
92 #endif
93
94 /* As of Cygwin 1.7.0, the prototypes in ndbm.h are broken when compiling
95 using C++, since they are of the form `datum dbm_firstkey()', without any
96 args given. */
97 /* Parameters to dbm_store for simple insertion or replacement. */
98 #define DBM_INSERT 0
99 #define DBM_REPLACE 1
100
101
102 /* The data and key structure. This structure is defined for compatibility. */
103 typedef struct {
104 char *dptr;
105 int dsize;
106 } datum;
107
108
109 /* The file information header. This is good enough for most applications. */
110 typedef struct {int dummy[10];} DBM;
111
112 int dbm_clearerr(DBM *);
113 void dbm_close(DBM *);
114 int dbm_delete(DBM *, datum);
115 int dbm_error(DBM *);
116 datum dbm_fetch(DBM *, datum);
117 datum dbm_firstkey(DBM *);
118 datum dbm_nextkey(DBM *);
119 DBM *dbm_open(const char *, int, mode_t);
120 int dbm_store(DBM *, datum, datum, int);
121
122 #if defined(__cplusplus) || defined(c_plusplus)
123 }
124 #endif
125
126 #else
88 #include NDBM_H_FILE 127 #include NDBM_H_FILE
128 #endif
89 Lisp_Object Qdbm; 129 Lisp_Object Qdbm;
90 #endif /* HAVE_DBM */ 130 #endif /* HAVE_DBM */
91 131
92 Lisp_Object Vdatabase_coding_system; 132 Lisp_Object Vdatabase_coding_system;
93 133