Home | History | Annotate | Download | only in tests-mx32
      1 #include <stdio.h>
      2 #include <sys/stat.h>
      3 
      4 void
      5 test_umask(const mode_t mode)
      6 {
      7 	mode_t rc = umask(0xffff0000 | mode);
      8 	printf("umask(%#03ho) = %#03o\n", (unsigned short) mode, rc);
      9 }
     10 
     11 int
     12 main(void)
     13 {
     14 	test_umask(0);
     15 	test_umask(06);
     16 	test_umask(026);
     17 	test_umask(0126);
     18 	test_umask(07777);
     19 	test_umask(0107777);
     20 	test_umask(-1);
     21 
     22 	puts("+++ exited with 0 +++");
     23 	return 0;
     24 }
     25