~ubuntu-branches/ubuntu/oneiric/haxe/oneiric

« back to all changes in this revision

Viewing changes to ocaml/extc/extc_stubs.c

  • Committer: Bazaar Package Importer
  • Author(s): Jens Peter Secher
  • Date: 2009-08-03 21:29:45 UTC
  • mfrom: (5.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090803212945-hy4s0okm36gtqzz5
Tags: 1:2.4-1
* New upstream version (CVS 2009-08-01).
* Removed obsolete parts of the copyright file now that ExtLib is 
  not included anymore.
* Included patch for Ubuntu location of zlib, thanks to Alessio Treglia.
  (Closes: #533159)
* Removed haxe-mode to get it into its own package.
  (Closes: #521222)
* Included new commands in bash_completion.
* Removed obsolete Lintian overrides.
* Bumped Standards-Version to 3.8.2, no change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#       include <sys/syslimits.h>
33
33
#       include <mach-o/dyld.h>
34
34
#endif
 
35
#ifdef __FreeBSD__
 
36
#       include <sys/param.h>
 
37
#       include <sys/sysctl.h>
 
38
#       include <sys/user.h>
 
39
#endif
 
40
 
35
41
 
36
42
#define zval(z)         ((z_streamp)(z))
37
43
 
136
142
        if ( _NSGetExecutablePath(path, &path_len) )
137
143
                failwith("executable_path");
138
144
        return caml_copy_string(path);
 
145
#elif __FreeBSD__
 
146
        char path[PATH_MAX];
 
147
        int error, name[4];
 
148
        size_t len;
 
149
        name[0] = CTL_KERN;
 
150
        name[1] = KERN_PROC;
 
151
        name[2] = KERN_PROC_PATHNAME;
 
152
        name[3] = (int)getpid();
 
153
        len = sizeof(path);
 
154
        error = sysctl(name, 4, path, &len, NULL, 0);
 
155
        if( error < 0 )
 
156
                failwith("executable_path");
 
157
        return caml_copy_string(path);
139
158
#else
140
159
        const char *p = getenv("_");
141
160
        if( p != NULL )