File: config-custom.h

package info (click to toggle)
stardict-tools 3.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,848 kB
  • sloc: cpp: 17,404; sh: 10,701; ansic: 1,985; python: 950; php: 308; makefile: 251; perl: 135
file content (63 lines) | stat: -rw-r--r-- 2,042 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef CONFIG_CUSTOM_H
#define CONFIG_CUSTOM_H

/* include this file at the bottom of config.h 
the following config.h files should be affected:
config.h
msvc_2008/config.h
stardict-tools/config.h

keep the following files in sync:
config-custom.h
stardict-tools/config-custom.h
*/

#include <glib.h>
#include <glib/gstdio.h>

/* g_stat function is declared differently depending on the version of glib 
GLIB_MICRO_VERSION version number may be incorrect, adjust it if needed. 
Use stardict_stat_t in the source code to define a structure for g_stat. */
#if GLIB_CHECK_VERSION(2, 25, 0)
  #if defined(G_OS_UNIX) && !defined(G_STDIO_NO_WRAP_ON_UNIX) 
    // int g_stat (const gchar *filename, struct stat *buf);
    typedef struct stat stardict_stat_t;
  #else
    // int g_stat (const gchar *filename, GStatBuf *buf);
    typedef GStatBuf stardict_stat_t;
  #endif
#elif GLIB_CHECK_VERSION(2, 24, 0)
  #if defined(G_OS_UNIX) && !defined(G_STDIO_NO_WRAP_ON_UNIX)
    // #define g_stat    stat
    typedef struct stat stardict_stat_t;
  #else /* ! G_OS_UNIX */
    #ifdef G_OS_WIN32
      #if defined (_MSC_VER) && !defined(_WIN64)
        // #define _g_stat_struct _stat32
      #else
        // #define _g_stat_struct stat
      #endif
      // int g_stat      (const gchar           *filename,
      //                   struct _g_stat_struct *buf);
      typedef struct _g_stat_struct stardict_stat_t;
    #else
      // int g_stat      (const gchar *filename,
      //                  struct stat *buf);
      typedef struct stat stardict_stat_t;
    #endif
  #endif /* G_OS_UNIX */
#elif GLIB_CHECK_VERSION(2, 20, 0)
  #if defined(G_OS_UNIX) && !defined(G_STDIO_NO_WRAP_ON_UNIX)
    // #define g_stat    stat
    typedef struct stat stardict_stat_t;
  #else
    // int g_stat      (const gchar *filename,
    //                  struct stat *buf);
    typedef struct stat stardict_stat_t;
  #endif
#else
  // int g_stat (const gchar *filename, struct stat *buf);
  typedef struct stat stardict_stat_t;
#endif

#endif // CONFIG_CUSTOM_H