summaryrefslogtreecommitdiffstats
path: root/src/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-04-28 15:04:46 +0800
committerPeng Wu <alexepico@gmail.com>2011-04-28 15:04:46 +0800
commit80d2b005249b772e7cd7fdf763e217576d401823 (patch)
tree1b1611cef942e5b98b88c1448ad53d9df7ba5e85 /src/storage
parentb7909ecd1b39843c99b44118a8e0fe269da7f098 (diff)
downloadlibpinyin-80d2b005249b772e7cd7fdf763e217576d401823.tar.gz
libpinyin-80d2b005249b772e7cd7fdf763e217576d401823.tar.xz
libpinyin-80d2b005249b772e7cd7fdf763e217576d401823.zip
use errno
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/flexible_ngram.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/storage/flexible_ngram.h b/src/storage/flexible_ngram.h
index 3fa452d..9b08a0d 100644
--- a/src/storage/flexible_ngram.h
+++ b/src/storage/flexible_ngram.h
@@ -25,6 +25,7 @@
#define FLEXIBLE_NGRAM_H
#include <db.h>
+#include <errno.h>
/* Note: the signature of the template parameters.
* struct MagicHeader, ArrayHeader, ArrayItem.
@@ -367,7 +368,7 @@ public:
if ( ret != DB_NOTFOUND ){
fprintf(stderr, "training db error, exit!");
- exit(1);
+ exit(EIO);
}
/* Cursors must be closed */