Browse Source

win32 compat

master
Felix von Leitner 15 years ago
parent
commit
77ec2baa8f
  1. 6
      test/cdbget2.c

6
test/cdbget2.c

@ -5,13 +5,17 @@
#include <stdlib.h>
#include <errmsg.h>
#ifndef O_BINARY
#define O_BINARY
#endif
int main(int argc,char* argv[]) {
int fd;
static struct cdb c;
errmsg_iam("cdbget");
if (argc<3)
die(1,"usage: cdbget data.cdb key");
fd=open(argv[1],O_RDONLY);
fd=open(argv[1],O_RDONLY|O_BINARY);
if (fd==-1)
diesys(1,"open");
cdb_init(&c,fd);

Loading…
Cancel
Save