~ubuntu-branches/ubuntu/raring/python-scipy/raring-proposed

« back to all changes in this revision

Viewing changes to Lib/sandbox/xplt/src/play/unix/config.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-07 14:12:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070107141212-mm0ebkh5b37hcpzn
* Remove build dependency on python-numpy-dev.
* python-scipy: Depend on python-numpy instead of python-numpy-dev.
* Package builds on other archs than i386. Closes: #402783.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * config.c -- $Id: config.c 685 2003-03-08 15:26:51Z travo $
 
3
 * configuration tester for UNIX machines
 
4
 *
 
5
 * Copyright (c) 1999.  See accompanying LEGAL file for details.
 
6
 */
 
7
 
 
8
#ifdef TEST_GCC
 
9
# ifdef __GNUC__
 
10
#define MAIN_BODY \
 
11
  value = 0;
 
12
# else
 
13
#error not gcc
 
14
# endif
 
15
#endif
 
16
 
 
17
#ifdef TEST_UTIME
 
18
/* check settings of: USE_GETRUSAGE USE_TIMES */
 
19
#include "timeu.c"
 
20
#define MAIN_BODY \
 
21
  double s; \
 
22
  double t = p_cpu_secs(&s); \
 
23
  value = 0;
 
24
#endif
 
25
 
 
26
#ifdef TEST_WTIME
 
27
/* check settings of: USE_GETTIMEOFDAY */
 
28
#include "timew.c"
 
29
#define MAIN_BODY \
 
30
  double t = p_wall_secs(); \
 
31
  value = 0;
 
32
#endif
 
33
 
 
34
#ifdef TEST_USERNM
 
35
/* check settings of: NO_PASSWD */
 
36
#include "usernm.c"
 
37
#define MAIN_BODY \
 
38
  char *u = p_getuser(); \
 
39
  value = (u!=0);
 
40
#endif
 
41
 
 
42
#ifdef TEST_TIOCGPGRP
 
43
/* check settings of: USE_TIOCGPGRP_IOCTL */
 
44
#include "uinbg.c"
 
45
#define MAIN_BODY \
 
46
  value = u_in_background();
 
47
#endif
 
48
 
 
49
#ifdef TEST_GETCWD
 
50
/* check settings of: USE_GETWD */
 
51
#include <unistd.h>
 
52
static char dirbuf[1024];
 
53
#ifdef USE_GETWD
 
54
#define getcwd(x,y) getwd(x)
 
55
#endif
 
56
#define MAIN_BODY \
 
57
  char *u = getcwd(dirbuf, 1024); \
 
58
  value = (u!=0);
 
59
#endif
 
60
 
 
61
#ifdef TEST_DIRENT
 
62
/* check settings of: DIRENT_HEADER USE_GETWD */
 
63
#include "dir.c"
 
64
p_twkspc p_wkspc;
 
65
#define MAIN_BODY \
 
66
  p_dir *d = p_dopen("no/such/thing"); \
 
67
  char *l = p_dnext(d, &value); \
 
68
  value = p_chdir(l) || p_rmdir(l) || p_mkdir(l);
 
69
#endif
 
70
 
 
71
#ifdef TEST_POLL
 
72
/* check settings of: USE_SYS_POLL_H USE_SELECT HAVE_SYS_SELECT_H
 
73
                      NO_SYS_TIME_H NEED_SELECT_PROTO */
 
74
#include "uevent.c"
 
75
#define MAIN_BODY \
 
76
  int p = u_poll(1000); \
 
77
  value = 0;
 
78
#endif
 
79
 
 
80
int
 
81
main(int argc, char *argv[])
 
82
{
 
83
  int value;
 
84
  MAIN_BODY
 
85
  return value;
 
86
}