author | mickeyl <mickeyl> | 2004-05-09 18:28:52 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-05-09 18:28:52 (UTC) |
commit | d43222da148755b44c74b176cde4dec5c56e1a79 (patch) (unidiff) | |
tree | b4fd6b8369deae40c78fd7f5ba12a13636cff831 | |
parent | 81bc0cecdeb7c49f4f2950c1e5649bad05593d0c (diff) | |
download | opie-d43222da148755b44c74b176cde4dec5c56e1a79.zip opie-d43222da148755b44c74b176cde4dec5c56e1a79.tar.gz opie-d43222da148755b44c74b176cde4dec5c56e1a79.tar.bz2 |
POSIX claims the includer of regex.h MUST include sys/types.h prior to including it.
Thus we can unify the case and unconditionally.
-rw-r--r-- | libopie2/opiedb/osqlitedriver.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/libopie2/opiedb/osqlitedriver.h b/libopie2/opiedb/osqlitedriver.h index 33037b8..e38fd52 100644 --- a/libopie2/opiedb/osqlitedriver.h +++ b/libopie2/opiedb/osqlitedriver.h | |||
@@ -1,56 +1,51 @@ | |||
1 | #ifndef OSQL_LITE_DRIVER_H | 1 | #ifndef OSQL_LITE_DRIVER_H |
2 | #define OSQL_LITE_DRIVER_H | 2 | #define OSQL_LITE_DRIVER_H |
3 | 3 | ||
4 | #include <sqlite.h> | 4 | #include <sqlite.h> |
5 | #if defined (__GNUC__) && (__GNUC__ < 3) | ||
6 | #include <sys/types.h> | 5 | #include <sys/types.h> |
7 | #endif | ||
8 | #ifdef Q_OS_MACX | ||
9 | #include <sys/types.h> | ||
10 | #endif | ||
11 | #include <regex.h> | 6 | #include <regex.h> |
12 | 7 | ||
13 | #include "osqldriver.h" | 8 | #include "osqldriver.h" |
14 | #include "osqlerror.h" | 9 | #include "osqlerror.h" |
15 | #include "osqlresult.h" | 10 | #include "osqlresult.h" |
16 | 11 | ||
17 | namespace Opie { | 12 | namespace Opie { |
18 | namespace DB { | 13 | namespace DB { |
19 | namespace Internal { | 14 | namespace Internal { |
20 | 15 | ||
21 | struct sqregex { | 16 | struct sqregex { |
22 | char *regex_raw; | 17 | char *regex_raw; |
23 | regex_t regex_c; | 18 | regex_t regex_c; |
24 | }; | 19 | }; |
25 | 20 | ||
26 | class OSQLiteDriver : public OSQLDriver { | 21 | class OSQLiteDriver : public OSQLDriver { |
27 | Q_OBJECT | 22 | Q_OBJECT |
28 | public: | 23 | public: |
29 | OSQLiteDriver( QLibrary *lib = 0l ); | 24 | OSQLiteDriver( QLibrary *lib = 0l ); |
30 | ~OSQLiteDriver(); | 25 | ~OSQLiteDriver(); |
31 | QString id()const; | 26 | QString id()const; |
32 | void setUserName( const QString& ); | 27 | void setUserName( const QString& ); |
33 | void setPassword( const QString& ); | 28 | void setPassword( const QString& ); |
34 | void setUrl( const QString& url ); | 29 | void setUrl( const QString& url ); |
35 | void setOptions( const QStringList& ); | 30 | void setOptions( const QStringList& ); |
36 | bool open(); | 31 | bool open(); |
37 | bool close(); | 32 | bool close(); |
38 | OSQLError lastError(); | 33 | OSQLError lastError(); |
39 | OSQLResult query( OSQLQuery* ); | 34 | OSQLResult query( OSQLQuery* ); |
40 | OSQLTable::ValueList tables()const; | 35 | OSQLTable::ValueList tables()const; |
41 | 36 | ||
42 | private: | 37 | private: |
43 | OSQLError m_lastE; | 38 | OSQLError m_lastE; |
44 | OSQLResult m_result; | 39 | OSQLResult m_result; |
45 | OSQLResultItem m_items; | 40 | OSQLResultItem m_items; |
46 | int handleCallBack( int, char**, char** ); | 41 | int handleCallBack( int, char**, char** ); |
47 | static int call_back( void*, int, char**, char** ); | 42 | static int call_back( void*, int, char**, char** ); |
48 | QString m_url; | 43 | QString m_url; |
49 | sqlite *m_sqlite; | 44 | sqlite *m_sqlite; |
50 | sqregex sqreg; | 45 | sqregex sqreg; |
51 | }; | 46 | }; |
52 | } | 47 | } |
53 | } | 48 | } |
54 | } | 49 | } |
55 | 50 | ||
56 | #endif | 51 | #endif |