~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/unistd/truncate.c

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-09-20 22:44:35 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130920224435-apuwj4fsl3fqv1a6
Tags: 1.5.6~20130920~6010666-1
* New snapshot release
* Update the list of supported architectures to the same as libv8
  (Closes: #723129)
* emlibtool has been removed from upstream.
* Fix warning syntax-error-in-dep5-copyright
* Refresh of the patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#include <fcntl.h>
5
5
#include <sys/stat.h>
6
6
#include <string.h>
 
7
#include <emscripten.h>
7
8
 
8
9
int main() {
 
10
  EM_ASM(
 
11
    FS.writeFile('/towrite', 'abcdef');
 
12
    FS.writeFile('/toread', 'abcdef');
 
13
    FS.chmod('/toread', 0444);
 
14
  );
 
15
 
9
16
  struct stat s;
10
17
  int f = open("/towrite", O_WRONLY);
11
18
  int f2 = open("/toread", O_RDONLY);