Diff

Differences From Artifact [ae48a5d486]:

To Artifact [5023626b86]:


66
67
68
69
70
71
72



73
74
75
76
77
78
79
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82







+
+
+








#ifndef O_BINARY
#define O_BINARY 0x0
#endif
#ifndef S_IFSOCK
#define S_IFSOCK 0140000
#endif
#ifndef O_LARGEFILE
#define O_LARGEFILE 0x0
#endif


//extern int errno;
struct dact_url_info {
	char *url;
	int flags;
	mode_t mode;
316
317
318
319
320
321
322
323

324
325
326
327
328
329
330
319
320
321
322
323
324
325

326
327
328
329
330
331
332
333







-
+







				
				break;
		}

		free(read_buf_s);
		close(fd);
	} else {
		fd=open(pathname,flags|O_BINARY,mode);
		fd=open(pathname,flags|O_BINARY|O_LARGEFILE,mode);
		if (dact_urls[fd].url!=NULL) free(dact_urls[fd].url);
		dact_urls[fd].url=strdup(pathname);
		dact_urls[fd].flags=flags;
		dact_urls[fd].mode=mode;
		return(fd);
	}

349
350
351
352
353
354
355



356
357
358
359
360
361

362
363
364
365
366
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366

367
368
369
370
371
372







+
+
+





-
+





	return(lseek(filedes,offset,whence));
}

#else
#ifndef O_BINARY
#define O_BINARY 0x0
#endif
#ifndef O_LARGEFILE
#define O_LARGEFILE 0x0
#endif

int createlisten(int port) { return(-1); }
void closeconnection(int sockfd) { return; }
int createconnection_tcp(char *host, int port) { return(-1); }
int open_net(const char *pathname, int flags, mode_t mode) {
	return(open(pathname,flags|O_BINARY,mode));
	return(open(pathname,flags|O_BINARY|O_LARGEFILE,mode));
}
off_t lseek_net(int filedes, off_t offset, int whence) {
	return(lseek(filedes,offset,whence));
}
#endif