# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1038751448 0 # Node ID 4e3407df0e38512ab97a4d82140e59adb19ed327 # Parent d78d08440246ef43fa3ec68d4fd0dfa6fda98ff0 Specify calling convention for compat functions. diff -r d78d08440246 -r 4e3407df0e38 compat.c --- a/compat.c Sun Dec 01 13:24:17 2002 +0000 +++ b/compat.c Sun Dec 01 14:04:08 2002 +0000 @@ -39,7 +39,7 @@ } #endif -int sockread (int a, void *b, int c, int d) +int API sockread (int a, void *b, int c, int d) { #if defined(__IBMC__) || (defined(__WIN32__) && !defined(__CYGWIN32__)) return recv(a,b,c,d); @@ -48,7 +48,7 @@ #endif } -int sockwrite (int a, void *b, int c, int d) +int API sockwrite (int a, void *b, int c, int d) { #if defined(__IBMC__) || (defined(__WIN32__) && !defined(__CYGWIN32__)) return send(a,b,c,d); @@ -57,7 +57,7 @@ #endif } -int sockclose(int a) +int API sockclose(int a) { #ifdef __IBMC__ return soclose(a); @@ -68,7 +68,7 @@ #endif } -int makedir(char *path) +int API makedir(char *path) { #if defined(__IBMC__) || defined(__WATCOMC__) || (defined(__WIN32__) && !defined(__CYGWIN32__)) return mkdir(path); @@ -77,7 +77,7 @@ #endif } -void nonblock(int fd) +void API nonblock(int fd) { #if defined(__OS2__) && !defined(__EMX__) static int _nonblock = 1; @@ -92,7 +92,7 @@ #endif } -void block(int fd) +void API block(int fd) { #if defined(__OS2__) && !defined(__EMX__) static int _nonblock = 0; @@ -107,7 +107,7 @@ #endif } -int socksprintf(int fd, char *format, ...) +int API socksprintf(int fd, char *format, ...) { va_list args; char outbuf[1024]; @@ -123,7 +123,7 @@ return len; } -void sockinit(void) +void API sockinit(void) { #ifdef __IBMC__ sock_init(); @@ -134,14 +134,14 @@ #endif /* !WIN32 */ } -void sockshutdown(void) +void API sockshutdown(void) { #if defined(__WIN32__) || defined(WINNT) WSACleanup(); #endif /* !WIN32 */ } -int sockpipe(int *pipes) +int API sockpipe(int *pipes) { #ifndef NO_DOMAIN_SOCKETS #ifndef HAVE_PIPE @@ -208,7 +208,7 @@ return 0; } -long double drivefree(int drive) +long double API drivefree(int drive) { #if defined(__EMX__) || defined(__OS2__) ULONG aulFSInfoBuf[40] = {0}; @@ -305,7 +305,7 @@ #endif } -long double drivesize(int drive) +long double API drivesize(int drive) { #if defined(__EMX__) || defined(__OS2__) ULONG aulFSInfoBuf[40] = {0}; @@ -402,7 +402,7 @@ #endif } -int isdrive(int drive) +int API isdrive(int drive) { #if defined(__EMX__) || defined(__OS2__) APIRET rc = NO_ERROR; @@ -493,7 +493,7 @@ return 0; } -void getfsname(int drive, char *buf, int len) +void API getfsname(int drive, char *buf, int len) { #ifdef __UNIX__ #ifdef __FreeBSD__ @@ -553,7 +553,7 @@ #endif } -void setfileinfo(char *filename, char *url, char *logfile) +void API setfileinfo(char *filename, char *url, char *logfile) { time_t ltime; struct tm *tm; @@ -629,7 +629,7 @@ #endif /* Sharable fopen() and fclose() calls. */ -FILE *fsopen(char *path, char *modes) +FILE * API fsopen(char *path, char *modes) { #if (defined(__OS2__) && !defined(__WATCOMC__)) || defined(__WIN32__) int z; @@ -678,7 +678,7 @@ #endif } -int fsclose(FILE *fp) +int API fsclose(FILE *fp) { #if defined(__OS2__) || defined(__WIN32__) if(FSIRoot) @@ -701,12 +701,12 @@ return fclose(fp); } -char *fsgets(char *str, int size, FILE *stream) +char * API fsgets(char *str, int size, FILE *stream) { return fgets(str, size, stream); } -int fsseek(FILE *stream, long offset, int whence) +int API fsseek(FILE *stream, long offset, int whence) { return fseek(stream, offset, whence); } @@ -777,7 +777,7 @@ /* Initialize the locale engine * Returns: TRUE on success, FALSE on failure. */ -int locale_init(char *filename, int my_locale) +int API locale_init(char *filename, int my_locale) { FILE *fp = fopen(filename, FOPEN_READ_TEXT); static char text[1025]; @@ -871,7 +871,7 @@ } /* Retrieve a localized string if available */ -char *locale_string(char *default_text, int message) +char * API locale_string(char *default_text, int message) { if(locale_number > -1 && message < locale_count && message > -1 && locale_text[message]) return locale_text[message];