1 /* Check that --sysroot is applied to open(2).
2 #sim: --sysroot=@exedir@
4 We assume, with EXE being the name of the executable:
5 - The simulator executes with cwd the same directory where the executable
6 is located (so argv[0] contains a plain filename without directory
8 - There's no /EXE on the host file system. */
14 int main (int argc
, char *argv
[])
18 if (argv
[0][0] != '/')
20 fnam
= malloc (strlen (argv
[0]) + 2);
24 strcat (fnam
, argv
[0]);
27 f
= fopen (fnam
, "rb");
32 /* Cover another execution path. */
33 if (fopen ("/nonexistent", "rb") != NULL
This page took 0.032028 seconds and 4 git commands to generate.