--------------------- PatchSet 3647 Date: 2006/09/02 13:51:43 Author: serassio Branch: nt Tag: (none) Log: Ran indent Members: lib/win32lib.c:1.2.18.8->1.2.18.9 Index: squid3/lib/win32lib.c =================================================================== RCS file: /cvsroot/squid-sf//squid3/lib/win32lib.c,v retrieving revision 1.2.18.8 retrieving revision 1.2.18.9 diff -u -r1.2.18.8 -r1.2.18.9 --- squid3/lib/win32lib.c 30 Oct 2005 20:08:11 -0000 1.2.18.8 +++ squid3/lib/win32lib.c 2 Sep 2006 13:51:43 -0000 1.2.18.9 @@ -1,5 +1,5 @@ /* - * $Id: win32lib.c,v 1.2.18.8 2005/10/30 20:08:11 serassio Exp $ + * $Id: win32lib.c,v 1.2.18.9 2006/09/02 13:51:43 serassio Exp $ * * * * * * * * * Legal stuff * * * * * * * * @@ -59,89 +59,101 @@ void GetProcessName(pid_t, char *); -#if defined(_MSC_VER) /* Microsoft C Compiler ONLY */ -size_t getpagesize() +#if defined(_MSC_VER) /* Microsoft C Compiler ONLY */ +size_t +getpagesize() { return 4096; } #endif -uid_t geteuid(void) +uid_t +geteuid(void) { return 100; } -uid_t getuid(void) +uid_t +getuid(void) { return 100; } -int setuid(uid_t uid) +int +setuid(uid_t uid) { return 0; } -int seteuid(uid_t euid) +int +seteuid(uid_t euid) { return 0; } -gid_t getegid(void) +gid_t +getegid(void) { return 100; } -gid_t getgid(void) +gid_t +getgid(void) { return 100; } -int setgid(gid_t gid) +int +setgid(gid_t gid) { return 0; } -int setegid(gid_t egid) +int +setegid(gid_t egid) { return 0; } -int chroot(const char *dirname) +int +chroot(const char *dirname) { - if (SetCurrentDirectory(dirname)) - return 0; - else - return GetLastError(); + if (SetCurrentDirectory(dirname)) + return 0; + else + return GetLastError(); } -void GetProcessName(pid_t pid, char * ProcessName) +void +GetProcessName(pid_t pid, char *ProcessName) { HANDLE hProcess; strcpy(ProcessName, "unknown"); #if HAVE_WIN32_PSAPI /* Get a handle to the process. */ - hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | - PROCESS_VM_READ, - FALSE, pid ); + hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | + PROCESS_VM_READ, + FALSE, pid); /* Get the process name. */ if (NULL != hProcess) { - HMODULE hMod; - DWORD cbNeeded; + HMODULE hMod; + DWORD cbNeeded; - if (EnumProcessModules(hProcess, &hMod, sizeof(hMod), &cbNeeded)) - GetModuleBaseName(hProcess, hMod, ProcessName, sizeof(ProcessName)); - else { - CloseHandle(hProcess); - return; - } + if (EnumProcessModules(hProcess, &hMod, sizeof(hMod), &cbNeeded)) + GetModuleBaseName(hProcess, hMod, ProcessName, sizeof(ProcessName)); + else { + CloseHandle(hProcess); + return; + } } else - return; + return; CloseHandle(hProcess); #endif } -int kill(pid_t pid, int sig) +int +kill(pid_t pid, int sig) { HANDLE hProcess; char MyProcessName[MAX_PATH]; @@ -149,66 +161,63 @@ if (sig == 0) { if ((hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | - PROCESS_VM_READ, - FALSE, pid)) == NULL) + PROCESS_VM_READ, + FALSE, pid)) == NULL) return -1; else { - CloseHandle(hProcess); - GetProcessName(getpid(), MyProcessName); - GetProcessName(pid, ProcessNameToCheck); - if (strcmp(MyProcessName, ProcessNameToCheck) == 0) - return 0; - return -1; + CloseHandle(hProcess); + GetProcessName(getpid(), MyProcessName); + GetProcessName(pid, ProcessNameToCheck); + if (strcmp(MyProcessName, ProcessNameToCheck) == 0) + return 0; + return -1; } - } - else return 0; + } else + return 0; } -int gettimeofday( struct timeval * pcur_time, void * tzp) -{ +int +gettimeofday(struct timeval *pcur_time, void *tzp) +{ struct _timeb current; - struct timezone * tz = (struct timezone *)tzp; + struct timezone *tz = (struct timezone *) tzp; _ftime(¤t); - - pcur_time->tv_sec=current.time; - pcur_time->tv_usec=current.millitm * 1000L; - if (tz) - { - tz->tz_minuteswest = current.timezone; /* minutes west of Greenwich */ - tz->tz_dsttime = current.dstflag; /* type of dst correction */ + + pcur_time->tv_sec = current.time; + pcur_time->tv_usec = current.millitm * 1000L; + if (tz) { + tz->tz_minuteswest = current.timezone; /* minutes west of Greenwich */ + tz->tz_dsttime = current.dstflag; /* type of dst correction */ } - return 0; } -int statfs(const char *path, struct statfs *sfs) +int +statfs(const char *path, struct statfs *sfs) { char drive[4]; DWORD spc, bps, freec, totalc; DWORD vsn, maxlen, flags; - if (!sfs) - { - errno=EINVAL; - return -1; + if (!sfs) { + errno = EINVAL; + return -1; } - - strncpy(drive,path,2); - drive[2]='\0'; - strcat(drive,"\\"); + strncpy(drive, path, 2); + drive[2] = '\0'; + strcat(drive, "\\"); if (!GetDiskFreeSpace(drive, &spc, &bps, &freec, &totalc)) { - errno=ENOENT; - return -1; + errno = ENOENT; + return -1; } - if (!GetVolumeInformation(drive, NULL, 0, &vsn, &maxlen, &flags, NULL, 0)) - { - errno=ENOENT; - return -1; + if (!GetVolumeInformation(drive, NULL, 0, &vsn, &maxlen, &flags, NULL, 0)) { + errno = ENOENT; + return -1; } sfs->f_type = flags; - sfs->f_bsize = spc*bps; + sfs->f_bsize = spc * bps; sfs->f_blocks = totalc; sfs->f_bfree = sfs->f_bavail = freec; sfs->f_files = -1; @@ -219,119 +228,233 @@ } int -WIN32_ftruncate (int fd, off_t size) +WIN32_ftruncate(int fd, off_t size) { - HANDLE hfile; - unsigned int curpos; + HANDLE hfile; + unsigned int curpos; - if (fd < 0) - return -1; - - hfile = (HANDLE) _get_osfhandle (fd); - curpos = SetFilePointer (hfile, 0, NULL, FILE_CURRENT); - if (curpos == 0xFFFFFFFF - || SetFilePointer (hfile, size, NULL, FILE_BEGIN) == 0xFFFFFFFF - || !SetEndOfFile (hfile)) - { - int error = GetLastError (); + if (fd < 0) + return -1; + + hfile = (HANDLE) _get_osfhandle(fd); + curpos = SetFilePointer(hfile, 0, NULL, FILE_CURRENT); + if (curpos == 0xFFFFFFFF + || SetFilePointer(hfile, size, NULL, FILE_BEGIN) == 0xFFFFFFFF + || !SetEndOfFile(hfile)) { + int error = GetLastError(); - switch (error) - { + switch (error) { case ERROR_INVALID_HANDLE: - errno = EBADF; - break; + errno = EBADF; + break; default: - errno = EIO; - break; + errno = EIO; + break; } - return -1; + return -1; } - - return 0; + return 0; } -int WIN32_truncate (const char *pathname, off_t length) +int +WIN32_truncate(const char *pathname, off_t length) { - int fd; - int res = -1; + int fd; + int res = -1; - fd = open (pathname, O_RDWR); + fd = open(pathname, O_RDWR); - if (fd == -1) - errno=EBADF; - else - { - res = WIN32_ftruncate (fd, length); - _close (fd); + if (fd == -1) + errno = EBADF; + else { + res = WIN32_ftruncate(fd, length); + _close(fd); } - return res; + return res; } static struct _wsaerrtext { - int err; - const char *errconst; - const char *errdesc; + int err; + const char *errconst; + const char *errdesc; } _wsaerrtext[] = { - {WSA_E_CANCELLED, "WSA_E_CANCELLED", "Lookup cancelled."}, - {WSA_E_NO_MORE, "WSA_E_NO_MORE", "No more data available."}, - {WSAEACCES, "WSAEACCES", "Permission denied."}, - {WSAEADDRINUSE, "WSAEADDRINUSE", "Address already in use."}, - {WSAEADDRNOTAVAIL, "WSAEADDRNOTAVAIL", "Cannot assign requested address."}, - {WSAEAFNOSUPPORT, "WSAEAFNOSUPPORT", "Address family not supported by protocol family."}, - {WSAEALREADY, "WSAEALREADY", "Operation already in progress."}, - {WSAEBADF, "WSAEBADF", "Bad file number."}, - {WSAECANCELLED, "WSAECANCELLED", "Operation cancelled."}, - {WSAECONNABORTED, "WSAECONNABORTED", "Software caused connection abort."}, - {WSAECONNREFUSED, "WSAECONNREFUSED", "Connection refused."}, - {WSAECONNRESET, "WSAECONNRESET", "Connection reset by peer."}, - {WSAEDESTADDRREQ, "WSAEDESTADDRREQ", "Destination address required."}, - {WSAEDQUOT, "WSAEDQUOT", "Disk quota exceeded."}, - {WSAEFAULT, "WSAEFAULT", "Bad address."}, - {WSAEHOSTDOWN, "WSAEHOSTDOWN", "Host is down."}, - {WSAEHOSTUNREACH, "WSAEHOSTUNREACH", "No route to host."}, - {WSAEINPROGRESS, "WSAEINPROGRESS", "Operation now in progress."}, - {WSAEINTR, "WSAEINTR", "Interrupted function call."}, - {WSAEINVAL, "WSAEINVAL", "Invalid argument."}, - {WSAEINVALIDPROCTABLE, "WSAEINVALIDPROCTABLE", "Invalid procedure table from service provider."}, - {WSAEINVALIDPROVIDER, "WSAEINVALIDPROVIDER", "Invalid service provider version number."}, - {WSAEISCONN, "WSAEISCONN", "Socket is already connected."}, - {WSAELOOP, "WSAELOOP", "Too many levels of symbolic links."}, - {WSAEMFILE, "WSAEMFILE", "Too many open files."}, - {WSAEMSGSIZE, "WSAEMSGSIZE", "Message too long."}, - {WSAENAMETOOLONG, "WSAENAMETOOLONG", "File name is too long."}, - {WSAENETDOWN, "WSAENETDOWN", "Network is down."}, - {WSAENETRESET, "WSAENETRESET", "Network dropped connection on reset."}, - {WSAENETUNREACH, "WSAENETUNREACH", "Network is unreachable."}, - {WSAENOBUFS, "WSAENOBUFS", "No buffer space available."}, - {WSAENOMORE, "WSAENOMORE", "No more data available."}, - {WSAENOPROTOOPT, "WSAENOPROTOOPT", "Bad protocol option."}, - {WSAENOTCONN, "WSAENOTCONN", "Socket is not connected."}, - {WSAENOTEMPTY, "WSAENOTEMPTY", "Directory is not empty."}, - {WSAENOTSOCK, "WSAENOTSOCK", "Socket operation on nonsocket."}, - {WSAEOPNOTSUPP, "WSAEOPNOTSUPP", "Operation not supported."}, - {WSAEPFNOSUPPORT, "WSAEPFNOSUPPORT", "Protocol family not supported."}, - {WSAEPROCLIM, "WSAEPROCLIM", "Too many processes."}, - {WSAEPROTONOSUPPORT, "WSAEPROTONOSUPPORT", "Protocol not supported."}, - {WSAEPROTOTYPE, "WSAEPROTOTYPE", "Protocol wrong type for socket."}, - {WSAEPROVIDERFAILEDINIT, "WSAEPROVIDERFAILEDINIT", "Unable to initialise a service provider."}, - {WSAEREFUSED, "WSAEREFUSED", "Refused."}, - {WSAEREMOTE, "WSAEREMOTE", "Too many levels of remote in path."}, - {WSAESHUTDOWN, "WSAESHUTDOWN", "Cannot send after socket shutdown."}, - {WSAESOCKTNOSUPPORT, "WSAESOCKTNOSUPPORT", "Socket type not supported."}, - {WSAESTALE, "WSAESTALE", "Stale NFS file handle."}, - {WSAETIMEDOUT, "WSAETIMEDOUT", "Connection timed out."}, - {WSAETOOMANYREFS, "WSAETOOMANYREFS", "Too many references."}, - {WSAEUSERS, "WSAEUSERS", "Too many users."}, - {WSAEWOULDBLOCK, "WSAEWOULDBLOCK", "Resource temporarily unavailable."}, - {WSANOTINITIALISED, "WSANOTINITIALISED", "Successful WSAStartup not yet performed."}, - {WSASERVICE_NOT_FOUND, "WSASERVICE_NOT_FOUND", "Service not found."}, - {WSASYSCALLFAILURE, "WSASYSCALLFAILURE", "System call failure."}, - {WSASYSNOTREADY, "WSASYSNOTREADY", "Network subsystem is unavailable."}, - {WSATYPE_NOT_FOUND, "WSATYPE_NOT_FOUND", "Class type not found."}, - {WSAVERNOTSUPPORTED, "WSAVERNOTSUPPORTED", "Winsock.dll version out of range."}, - {WSAEDISCON, "WSAEDISCON", "Graceful shutdown in progress."} + + { + WSA_E_CANCELLED, "WSA_E_CANCELLED", "Lookup cancelled." + }, + { + WSA_E_NO_MORE, "WSA_E_NO_MORE", "No more data available." + }, + { + WSAEACCES, "WSAEACCES", "Permission denied." + }, + { + WSAEADDRINUSE, "WSAEADDRINUSE", "Address already in use." + }, + { + WSAEADDRNOTAVAIL, "WSAEADDRNOTAVAIL", "Cannot assign requested address." + }, + { + WSAEAFNOSUPPORT, "WSAEAFNOSUPPORT", "Address family not supported by protocol family." + }, + { + WSAEALREADY, "WSAEALREADY", "Operation already in progress." + }, + { + WSAEBADF, "WSAEBADF", "Bad file number." + }, + { + WSAECANCELLED, "WSAECANCELLED", "Operation cancelled." + }, + { + WSAECONNABORTED, "WSAECONNABORTED", "Software caused connection abort." + }, + { + WSAECONNREFUSED, "WSAECONNREFUSED", "Connection refused." + }, + { + WSAECONNRESET, "WSAECONNRESET", "Connection reset by peer." + }, + { + WSAEDESTADDRREQ, "WSAEDESTADDRREQ", "Destination address required." + }, + { + WSAEDQUOT, "WSAEDQUOT", "Disk quota exceeded." + }, + { + WSAEFAULT, "WSAEFAULT", "Bad address." + }, + { + WSAEHOSTDOWN, "WSAEHOSTDOWN", "Host is down." + }, + { + WSAEHOSTUNREACH, "WSAEHOSTUNREACH", "No route to host." + }, + { + WSAEINPROGRESS, "WSAEINPROGRESS", "Operation now in progress." + }, + { + WSAEINTR, "WSAEINTR", "Interrupted function call." + }, + { + WSAEINVAL, "WSAEINVAL", "Invalid argument." + }, + { + WSAEINVALIDPROCTABLE, "WSAEINVALIDPROCTABLE", "Invalid procedure table from service provider." + }, + { + WSAEINVALIDPROVIDER, "WSAEINVALIDPROVIDER", "Invalid service provider version number." + }, + { + WSAEISCONN, "WSAEISCONN", "Socket is already connected." + }, + { + WSAELOOP, "WSAELOOP", "Too many levels of symbolic links." + }, + { + WSAEMFILE, "WSAEMFILE", "Too many open files." + }, + { + WSAEMSGSIZE, "WSAEMSGSIZE", "Message too long." + }, + { + WSAENAMETOOLONG, "WSAENAMETOOLONG", "File name is too long." + }, + { + WSAENETDOWN, "WSAENETDOWN", "Network is down." + }, + { + WSAENETRESET, "WSAENETRESET", "Network dropped connection on reset." + }, + { + WSAENETUNREACH, "WSAENETUNREACH", "Network is unreachable." + }, + { + WSAENOBUFS, "WSAENOBUFS", "No buffer space available." + }, + { + WSAENOMORE, "WSAENOMORE", "No more data available." + }, + { + WSAENOPROTOOPT, "WSAENOPROTOOPT", "Bad protocol option." + }, + { + WSAENOTCONN, "WSAENOTCONN", "Socket is not connected." + }, + { + WSAENOTEMPTY, "WSAENOTEMPTY", "Directory is not empty." + }, + { + WSAENOTSOCK, "WSAENOTSOCK", "Socket operation on nonsocket." + }, + { + WSAEOPNOTSUPP, "WSAEOPNOTSUPP", "Operation not supported." + }, + { + WSAEPFNOSUPPORT, "WSAEPFNOSUPPORT", "Protocol family not supported." + }, + { + WSAEPROCLIM, "WSAEPROCLIM", "Too many processes." + }, + { + WSAEPROTONOSUPPORT, "WSAEPROTONOSUPPORT", "Protocol not supported." + }, + { + WSAEPROTOTYPE, "WSAEPROTOTYPE", "Protocol wrong type for socket." + }, + { + WSAEPROVIDERFAILEDINIT, "WSAEPROVIDERFAILEDINIT", "Unable to initialise a service provider." + }, + { + WSAEREFUSED, "WSAEREFUSED", "Refused." + }, + { + WSAEREMOTE, "WSAEREMOTE", "Too many levels of remote in path." + }, + { + WSAESHUTDOWN, "WSAESHUTDOWN", "Cannot send after socket shutdown." + }, + { + WSAESOCKTNOSUPPORT, "WSAESOCKTNOSUPPORT", "Socket type not supported." + }, + { + WSAESTALE, "WSAESTALE", "Stale NFS file handle." + }, + { + WSAETIMEDOUT, "WSAETIMEDOUT", "Connection timed out." + }, + { + WSAETOOMANYREFS, "WSAETOOMANYREFS", "Too many references." + }, + { + WSAEUSERS, "WSAEUSERS", "Too many users." + }, + { + WSAEWOULDBLOCK, "WSAEWOULDBLOCK", "Resource temporarily unavailable." + }, + { + WSANOTINITIALISED, "WSANOTINITIALISED", "Successful WSAStartup not yet performed." + }, + { + WSASERVICE_NOT_FOUND, "WSASERVICE_NOT_FOUND", "Service not found." + }, + { + WSASYSCALLFAILURE, "WSASYSCALLFAILURE", "System call failure." + }, + { + WSASYSNOTREADY, "WSASYSNOTREADY", "Network subsystem is unavailable." + }, + { + WSATYPE_NOT_FOUND, "WSATYPE_NOT_FOUND", "Class type not found." + }, + { + WSAVERNOTSUPPORTED, "WSAVERNOTSUPPORTED", "Winsock.dll version out of range." + }, + { + WSAEDISCON, "WSAEDISCON", "Graceful shutdown in progress." + } }; /* @@ -345,7 +468,7 @@ if (err == 0) return "(0) No error."; - for (i = 0; i < sizeof(_wsaerrtext)/sizeof(struct _wsaerrtext); i++) { + for (i = 0; i < sizeof(_wsaerrtext) / sizeof(struct _wsaerrtext); i++) { if (_wsaerrtext[i].err != err) continue; errind = i; @@ -358,16 +481,20 @@ return xwsaerror_buf; } -struct passwd *getpwnam(char * unused) +struct passwd * +getpwnam(char *unused) { - static struct passwd pwd = {NULL, NULL, 100, 100, NULL, NULL, NULL}; - return &pwd; + static struct passwd pwd = + {NULL, NULL, 100, 100, NULL, NULL, NULL}; + return &pwd; } -struct group *getgrnam(char * unused) +struct group * +getgrnam(char *unused) { - static struct group grp = {NULL, NULL, 100, NULL}; - return &grp; + static struct group grp = + {NULL, NULL, 100, NULL}; + return &grp; } /* @@ -379,36 +506,36 @@ static char xbstrerror_buf[BUFSIZ]; if (err < 0 || err >= sys_nerr) - strncpy(xbstrerror_buf, wsastrerror(err), BUFSIZ); + strncpy(xbstrerror_buf, wsastrerror(err), BUFSIZ); else - strncpy(xbstrerror_buf, strerror(err), BUFSIZ); + strncpy(xbstrerror_buf, strerror(err), BUFSIZ); return xbstrerror_buf; } -#if defined(__MINGW32__) /* MinGW environment */ -int _free_osfhnd(int filehandle) -{ - if ( ((unsigned)filehandle < SQUID_MAXFD) && - (_osfile(filehandle) & FOPEN) && - (_osfhnd(filehandle) != (long)INVALID_HANDLE_VALUE) ) - { - switch (filehandle) { - case 0: - SetStdHandle( STD_INPUT_HANDLE, NULL ); - break; - case 1: - SetStdHandle( STD_OUTPUT_HANDLE, NULL ); - break; - case 2: - SetStdHandle( STD_ERROR_HANDLE, NULL ); - break; - } - _osfhnd(filehandle) = (long)INVALID_HANDLE_VALUE; - return(0); +#if defined(__MINGW32__) /* MinGW environment */ +int +_free_osfhnd(int filehandle) +{ + if (((unsigned) filehandle < SQUID_MAXFD) && + (_osfile(filehandle) & FOPEN) && + (_osfhnd(filehandle) != (long) INVALID_HANDLE_VALUE)) { + switch (filehandle) { + case 0: + SetStdHandle(STD_INPUT_HANDLE, NULL); + break; + case 1: + SetStdHandle(STD_OUTPUT_HANDLE, NULL); + break; + case 2: + SetStdHandle(STD_ERROR_HANDLE, NULL); + break; + } + _osfhnd(filehandle) = (long) INVALID_HANDLE_VALUE; + return (0); } else { - errno = EBADF; /* bad handle */ - _doserrno = 0L; /* not an OS error */ - return -1; + errno = EBADF; /* bad handle */ + _doserrno = 0L; /* not an OS error */ + return -1; } } #endif @@ -418,7 +545,8 @@ int POSIX_errno; }; -static struct errorentry errortable[] = { +static struct errorentry errortable[] = +{ {ERROR_INVALID_FUNCTION, EINVAL}, {ERROR_FILE_NOT_FOUND, ENOENT}, {ERROR_PATH_NOT_FOUND, ENOENT}, @@ -455,7 +583,7 @@ {ERROR_DIRECT_ACCESS_HANDLE, EBADF}, {ERROR_NEGATIVE_SEEK, EINVAL}, {ERROR_SEEK_ON_DEVICE, EACCES}, - {ERROR_DIR_NOT_EMPTY, ENOTEMPTY }, + {ERROR_DIR_NOT_EMPTY, ENOTEMPTY}, {ERROR_NOT_LOCKED, EACCES}, {ERROR_BAD_PATHNAME, ENOENT}, {ERROR_MAX_THRDS_REACHED, EAGAIN}, @@ -463,7 +591,7 @@ {ERROR_ALREADY_EXISTS, EEXIST}, {ERROR_FILENAME_EXCED_RANGE, ENOENT}, {ERROR_NESTING_NOT_ALLOWED, EAGAIN}, - {ERROR_NOT_ENOUGH_QUOTA, ENOMEM} + {ERROR_NOT_ENOUGH_QUOTA, ENOMEM} }; #define MIN_EXEC_ERROR ERROR_INVALID_STARTING_CODESEG @@ -472,22 +600,23 @@ #define MIN_EACCES_RANGE ERROR_WRITE_PROTECT #define MAX_EACCES_RANGE ERROR_SHARING_BUFFER_EXCEEDED -void WIN32_maperror(unsigned long WIN32_oserrno) +void +WIN32_maperror(unsigned long WIN32_oserrno) { int i; _doserrno = WIN32_oserrno; - for (i = 0; i < (sizeof(errortable)/sizeof(struct errorentry)); ++i) { + for (i = 0; i < (sizeof(errortable) / sizeof(struct errorentry)); ++i) { if (WIN32_oserrno == errortable[i].WIN32_code) { - errno = errortable[i].POSIX_errno; - return; - } + errno = errortable[i].POSIX_errno; + return; + } } if (WIN32_oserrno >= MIN_EACCES_RANGE && WIN32_oserrno <= MAX_EACCES_RANGE) - errno = EACCES; + errno = EACCES; else if (WIN32_oserrno >= MIN_EXEC_ERROR && WIN32_oserrno <= MAX_EXEC_ERROR) - errno = ENOEXEC; + errno = ENOEXEC; else - errno = EINVAL; + errno = EINVAL; } #endif