00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "defs.h"
00022
00023 #define PATHNAME "temporary"
00024
00025 int main(void)
00026 {
00027 #if !defined(_POSIX_ASYNCHRONOUS_IO) || _POSIX_ASYNCHRONOUS_IO == -1
00028 printf("_POSIX_ASYNCHRONOUS_IO unsupported\n");
00029 return EXIT_SUCCESS;
00030 #else
00031 int fd;
00032
00033 ec_neg1( fd = open(PATHNAME, O_WRONLY | O_CREAT, PERM_FILE) )
00034 ec_neg1( close(fd) )
00035
00036 switch (option_async_io(PATHNAME)) {
00037 case OPT_YES:
00038 printf("async supported on %s\n", PATHNAME);
00039 break;
00040 case OPT_NO:
00041 printf("async unsupported on %s\n", PATHNAME);
00042 break;
00043 case OPT_ERROR:
00044 EC_FAIL
00045 }
00046 return EXIT_SUCCESS;
00047
00048 EC_CLEANUP_BGN
00049 return EXIT_FAILURE;
00050 EC_CLEANUP_END
00051 #endif
00052 }