1*4b169a6bSchristos /* Check that we get the expected message for unsupported fcntl calls. 2*4b169a6bSchristos #progos: linux 3*4b169a6bSchristos #xerror: 4*4b169a6bSchristos #output: Unimplemented fcntl* 5*4b169a6bSchristos #output: program stopped with signal 4 (*).\n 6*4b169a6bSchristos */ 7*4b169a6bSchristos #include <fcntl.h> 8*4b169a6bSchristos #include <stdio.h> 9*4b169a6bSchristos #include <stdlib.h> 10*4b169a6bSchristos #include <errno.h> 11*4b169a6bSchristos main(void)12*4b169a6bSchristosint main (void) 13*4b169a6bSchristos { 14*4b169a6bSchristos int err = fcntl (1, 42); 15*4b169a6bSchristos if (err == -1 && errno == ENOSYS) 16*4b169a6bSchristos printf ("ENOSYS\n"); 17*4b169a6bSchristos printf ("xyzzy\n"); 18*4b169a6bSchristos exit (0); 19*4b169a6bSchristos } 20