Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.ARPA Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!ken@CIT-Hamlet.ARPA From: ken@CIT-Hamlet.ARPA Newsgroups: fa.info-vax Subject: DEC C 2.0 problem(?) Message-ID: <850829133212.02d@Hamlet> Date: Thu, 29-Aug-85 16:33:04 EDT Article-I.D.: Hamlet.850829133212.02d Posted: Thu Aug 29 16:33:04 1985 Date-Received: Sat, 31-Aug-85 06:23:19 EDT Sender: daemon@ucbvax.ARPA Reply-To: info-vax@ucb-vax.berkeley.edu Organization: The ARPA Internet Lines: 39 Has anyone been able to get the "ctx=bin" argument to open() as documented on page 18-5 of the C run-time library manual to work? I just get ACCVIOs from the open() when I give this argument. Example: #include -ken adelman caltech #ifdef vms #include #else #include #endif /* Test DEC stdio to see if it's really translating ^J -> ^M */ main() { int fd; FILE *fp; fd = open("FOO.LIS", O_RDWR|O_CREAT, 0644, "ctx=bin"); if (fd == -1) { printf("open failed\r\n"); exit(-1); } else printf("open succeeded, fd is %d\n", fd); fp = fdopen(fd, "w"); if (fp == NULL) { printf("fdopen failed\r\n"); exit(-1); } else printf("fdopen succeeded, fp is 0x%x\n", fp); fprintf(fp, "This should work\rMore foo\r\n"); exit(1); }