File: common.h

package info (click to toggle)
guymager 0.4.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 932 kB
  • ctags: 1,580
  • sloc: cpp: 8,522; ansic: 2,571; makefile: 49; sh: 23
file content (61 lines) | stat: -rw-r--r-- 1,696 bytes parent folder | download
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
// ****************************************************************************
//  Project:        GUYMAGER
// ****************************************************************************
//  Programmer:     Guy Voncken
//                  Police Grand-Ducale
//                  Service de Police Judiciaire
//                  Section Nouvelles Technologies
// ****************************************************************************
//  Module:         Standard include file
// ****************************************************************************

#ifndef __COMMON_H__
#define __COMMON_H__

// GNU C lib definitions
// ---------------------
#ifndef _LARGEFILE_SOURCE
   #define _LARGEFILE_SOURCE 1
#endif

#ifndef _FILE_OFFSET_BITS
   #define _FILE_OFFSET_BITS 64
#endif

#ifndef _GNU_SOURCE
   #define _GNU_SOURCE 1
#endif

#ifndef _THREAD_SAFE
   #define _THREAD_SAFE 1
#endif

#ifndef _STDIO_H
   #include <stdio.h>
#endif

#include "toolglobalid.h"
#include "error/toolerror.h"
#include "log/toollog.h"
#include "tooltypes.h"

#include "modules.h"
#include "error.h"

#define QSTR_TO_PSZ(QStr) (QStr).toAscii().constData()


extern void *pOffsetOfNullPointer;
#define OFFSET_OF(Type, Element)                            \
   ((unsigned int) &(((Type*)pOffsetOfNullPointer)->Element))

#endif


class t_Device;                      // As t_Device is the core structure of guymager and as it is needed
typedef t_Device       *t_pDevice;   // all the time, it is easiest to declare it here (eventhough I don't
typedef t_Device const *t_pcDevice;  // like that style too much, but we won't change C++ at this time).


#define EWF_MULTITHREADED_COMPRESSION_CHUNK_SIZE       32768