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

« back to all changes in this revision

Viewing changes to src/netsys/configtests/posix_memalign.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:
 
1
#define _GNU_SOURCE
 
2
 
 
3
#include <unistd.h>
 
4
 
 
5
#include "caml/mlvalues.h"
 
6
#include "caml/alloc.h"
 
7
 
 
8
/* reminder: we return the exit code, and 0 means success */
 
9
 
 
10
value check(value dummy) {
 
11
    int e;
 
12
    void *addr;
 
13
 
 
14
    e = posix_memalign(&addr, 4096, 4096);
 
15
    
 
16
    return Val_int(e == 0 ? 0 : 1);
 
17
}