~ubuntu-branches/ubuntu/trusty/ocamlnet/trusty

« back to all changes in this revision

Viewing changes to src/netsys/configtests/posix_shm.c

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-09-02 14:12:33 UTC
  • mfrom: (18.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110902141233-zbj0ygxb92u6gy4z
Tags: 3.4-1
* New upstream release
  - add a new NetcgiRequire directive to ease dependency management
    (Closes: #637147)
  - remove patches that were applied upstream:
    + Added-missing-shebang-lines-in-example-shell-scripts
    + Try-also-ocamlc-for-POSIX-threads

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#include "caml/mlvalues.h"
7
7
#include "caml/alloc.h"
8
8
 
 
9
/* reminder: we return the exit code, and 0 means success */
 
10
 
9
11
value check(value dummy) {
10
12
    int ret;
11
13
 
12
14
    ret = shm_open("/thisFileDoesNotExist", O_RDONLY, 0);
13
15
    if (ret == -1 && errno == ENOENT) {
14
 
        return Val_int(0);
 
16
        return Val_int(0);  /* success */
15
17
    };
16
18
    return Val_int(1);
17
19
}