~ubuntu-branches/debian/sid/cde/sid

« back to all changes in this revision

Viewing changes to strace-4.6/cde.h

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2012-02-03 19:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20120203192705-ll6f1nr45ead65ed
Tags: upstream-0.1
ImportĀ upstreamĀ versionĀ 0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _CDE_H
 
2
#define _CDE_H
 
3
 
 
4
// TODO: we probably don't need most of these #includes
 
5
#include <sys/select.h>
 
6
#include <sys/user.h> // a user told me that user.h should go after select.h to fix a compile error
 
7
#include <sys/time.h>
 
8
#include <string.h>
 
9
#include <utime.h>
 
10
//#include <sys/ptrace.h>
 
11
//#include <linux/ptrace.h>   /* For constants ORIG_EAX etc */
 
12
//#include <sys/syscall.h>   /* For constants SYS_write etc */
 
13
#include <linux/types.h>
 
14
#include <sys/types.h>
 
15
#include <sys/wait.h>
 
16
#include <unistd.h>
 
17
 
 
18
//#define _GNU_SOURCE // for vasprintf (now we include _GNU_SOURCE in Makefile)
 
19
#include <stdio.h>
 
20
 
 
21
#include <stdlib.h>
 
22
#include <errno.h>
 
23
#include <fcntl.h>
 
24
#include <stdarg.h>
 
25
#include <assert.h>
 
26
#include <sys/mman.h>
 
27
#include <linux/ipc.h>
 
28
#include <linux/shm.h>
 
29
#include <sys/stat.h>
 
30
#include <sys/param.h>
 
31
 
 
32
#include "defs.h"
 
33
 
 
34
// to shut up gcc warnings without causing nasty #include conflicts
 
35
// TODO: do we still need this?
 
36
int shmget(key_t key, size_t size, int shmflg);
 
37
void *shmat(int shmid, const void *shmaddr, int shmflg);
 
38
int shmdt(const void *shmaddr);
 
39
int shmctl(int shmid, int cmd, struct shmid_ds *buf);
 
40
 
 
41
 
 
42
// like an assert except that it always fires
 
43
#define EXITIF(x) do { \
 
44
  if (x) { \
 
45
    fprintf(stderr, "Fatal error in %s [%s:%d]\n", __FUNCTION__, __FILE__, __LINE__); \
 
46
    exit(1); \
 
47
  } \
 
48
} while(0)
 
49
 
 
50
 
 
51
#endif // _CDE_H