*cookieptr = (PTR) fd;
*cookieptr = (void *) fd;
__stdio_open (filename, m, cookieptr)     const char *filename;     __io_mode m;     void **cookieptr;{  int fd;  int mode;  if (m.__read && m.__write)    mode = O_RDWR;  else    mode = m.__read ? O_RDONLY : O_WRONLY;  if (m.__append)    mode |= O_APPEND;  if (m.__exclusive)    mode |= O_EXCL;  if (m.__truncate)    mode |= O_TRUNC;  if (m.__create)    fd = __open (filename, mode | O_CREAT,		 S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);  else    fd = __open (filename, mode);  if (fd < 0)    return -1;  *cookieptr = (PTR) fd;  return 0;}