diff options
author | Alexander Barkov <bar@mnogosearch.org> | 2013-02-06 15:17:34 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mnogosearch.org> | 2013-02-06 15:17:34 +0400 |
commit | 22a8fb03db5bdba75110f944b937678f21221fa7 (patch) | |
tree | 0900bbfbbc0febccf51c57639f997945dd289593 /storage/connect/plgdbsem.h | |
parent | 9aa88d50509898042ce4053cc9285bdd9a4944b6 (diff) | |
download | mariadb-git-22a8fb03db5bdba75110f944b937678f21221fa7.tar.gz |
Introducing functions global_open() and global_fopen() for these purposes:
- Removing duplicate code to generate error message text
- In the future they will most likely check secure_file_priv directory.
modified:
storage/connect/filamdbf.cpp
storage/connect/filamfix.cpp
storage/connect/filamtxt.cpp
storage/connect/filamvct.cpp
storage/connect/libdoc.cpp
storage/connect/maputil.cpp
storage/connect/plgdbsem.h
storage/connect/plgdbutl.cpp
storage/connect/tabfmt.cpp
storage/connect/tabmul.cpp
storage/connect/tabxml.cpp
storage/connect/xindex.cpp
Diffstat (limited to 'storage/connect/plgdbsem.h')
-rw-r--r-- | storage/connect/plgdbsem.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/storage/connect/plgdbsem.h b/storage/connect/plgdbsem.h index e690a0e4efa..13d2f81cdc1 100644 --- a/storage/connect/plgdbsem.h +++ b/storage/connect/plgdbsem.h @@ -508,3 +508,16 @@ DllExport PSZ GetIniString(PGLOBAL, void *, LPCSTR, LPCSTR, LPCSTR, LPCSTR); DllExport int GetIniSize(char *, char *, char *, char *);
DllExport bool WritePrivateProfileInt(LPCSTR, LPCSTR, int, LPCSTR);
DllExport void NewPointer(PTABS, void *, void *);
+
+
+#define MSGID_NONE 0
+#define MSGID_CANNOT_OPEN 1
+#define MSGID_OPEN_MODE_ERROR 2
+#define MSGID_OPEN_STRERROR 3
+#define MSGID_OPEN_ERROR_AND_STRERROR 4
+#define MSGID_OPEN_MODE_STRERROR 5
+#define MSGID_OPEN_EMPTY_FILE 6
+
+FILE *global_fopen(GLOBAL *g, int msgid, const char *path, const char *mode);
+int global_open(GLOBAL *g, int msgid, const char *filename, int flags);
+int global_open(GLOBAL *g, int msgid, const char *filename, int flags, int mode);
|