~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to routines/sun/tmpdir.c

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#include "../machine.h"
4
4
#include <stdio.h>
5
5
 
6
 
#ifdef __STDC__
 
6
#if defined(__STDC__) || defined(__MSC__) || defined(__CYGWIN__) ||  (defined __ABSC__)
7
7
#include <stdlib.h>
8
8
#ifndef WIN32
9
9
#include <sys/types.h>
13
13
extern  char  *getenv();
14
14
#endif
15
15
 
16
 
#if (defined __MSC__) || (defined __ABSC__)
17
 
#include <stdlib.h> 
18
 
#ifdef __MINGW32__
19
 
/** XXXXX missing in mingw32 **/
20
 
#define putenv(x) 
21
 
#else 
 
16
#if (defined __MSC__) || (defined __ABSC__) || defined(__MINGW32__) 
22
17
#ifdef __ABSC__
23
18
#define putenv(x) abs_putenv(x)
24
19
#define getpid() getpid_()
25
20
#else
26
21
#define putenv(x) _putenv(x)
27
22
#endif
28
 
#endif 
29
23
#endif
30
24
 
 
25
#if defined(__MSC__)
 
26
#include <process.h>
 
27
#endif
31
28
 
32
29
extern void C2F(setprlev) __PARAMS((int*));
33
30
 
 
31
#ifdef WIN32
 
32
extern int SciCreateDirectory (char *path);
 
33
extern int SciRemoveDirectory (char *path);
 
34
#endif
 
35
 
34
36
static char tmp_dir[256],buf[256];
35
37
 
36
38
 
39
41
 * and fixes the TMPDIR env variable
40
42
 ****************************/
41
43
 
42
 
void C2F(settmpdir)()
 
44
void C2F(settmpdir)(void)
43
45
{
44
46
  static int first =0;
45
47
  if ( first == 0 ) 
66
68
 * get a reference to tmp_dir 
67
69
 ****************************/
68
70
 
69
 
char *get_sci_tmp_dir() 
 
71
char *get_sci_tmp_dir(void)
70
72
{
71
73
  /* just in case */
72
74
  C2F(settmpdir)();
81
83
  extern void hppa_sci_unlink_shared();
82
84
#endif
83
85
 
84
 
void C2F(tmpdirc)()
 
86
void C2F(tmpdirc)(void)
85
87
{
86
88
  char *tmp_dir = get_sci_tmp_dir(); 
87
89
#ifdef WIN32