{
/* FIXME: This only works as long as the application uses the old
struct stat with 32 bit off_t types!!!
-
+
As soon as we switch over to 64 bit, we have to decide by
the applications API minor version number, whether to use
a pointer to a __stat64 or a _stat32 struct to the
{
/* FIXME: This only works as long as the application uses the old
struct stat with 32 bit off_t types!!!
-
+
As soon as we switch over to 64 bit, we have to decide by
the applications API minor version number, whether to use
a pointer to a __stat64 or a _stat32 struct to the
will be autoloaded. To do so, add one of the LoadDllfunc* macros to
autoload.cc. All macros eventually resolve to the following form:
-LoadDLLfuncEx2 (function name, parameter block length, dll name,
+LoadDLLfuncEx2 (function name, parameter block length, dll name,
non-fatality flag , value to return if function not available)
-Parameter block length is a sum of sizes (in bytes) of parameters which are
-being passed to the function. If non-fatality flag is set to 0, then failure
-to load dll and find a function will cause fatal error. If non fatality flag
+Parameter block length is a sum of sizes (in bytes) of parameters which are
+being passed to the function. If non-fatality flag is set to 0, then failure
+to load dll and find a function will cause fatal error. If non fatality flag
is set to 1, then call to the function will return default value.
You can also use shorter versions -- LoadDLLfuncEx and LoadDLLfunc, if the
defaults they provide suit your needs.
#endif
struct stat
-{
+{
dev_t st_dev;
ino_t st_ino;
mode_t st_mode;
void pthread_cleanup_pop (int execute);
*/
typedef void (*__cleanup_routine_type) (void *);
-typedef struct _pthread_cleanup_handler
+typedef struct _pthread_cleanup_handler
{
__cleanup_routine_type function;
void *arg;
winsock2_active);
fhandler_socket *fh =
(fhandler_socket *) cygheap->fdtab.build_fhandler (fd, FH_SOCKET, name);
+ if (!fh)
+ return NULL;
fh->set_io_handle ((HANDLE) soc);
fh->set_flags (O_RDWR | O_BINARY);
fh->set_r_no_interrupt (winsock2_active);
name = (type == SOCK_STREAM ? "/dev/streamsocket" : "/dev/dgsocket");
fh = fdsock (fd, name, soc);
- if (fh)
+ if (!fh)
+ {
+ closesocket (soc);
+ res = -1;
+ }
+ else
{
fh->set_addr_family (af);
fh->set_socket_type (type);
+ res = fd;
}
- res = fd;
}
done:
/* Non-zero if process was stopped by a signal. */
char stopsig;
-
+
/* commune */
pid_t hello_pid;
HANDLE tothem;
for (i = 0; i < acl->AceCount; ++i)
{
ACCESS_ALLOWED_ACE *ace;
-
+
if (!GetAce (acl, i, (PVOID *) &ace))
continue;
}
}
/* Include DEF_CLASS_OBJ if any default ace exists */
- if ((types_def & (USER|GROUP))
+ if ((types_def & (USER|GROUP))
&& ((pos = searchace (lacl, MAX_ACL_ENTRIES, DEF_CLASS_OBJ)) >= 0))
{
lacl[pos].a_type = DEF_CLASS_OBJ;
if ((pos = searchace (lacl, MAX_ACL_ENTRIES, 0)) < 0)
pos = MAX_ACL_ENTRIES;
if (aclbufp) {
- if (EqualSid (owner_sid, group_sid))
+ if (EqualSid (owner_sid, group_sid))
lacl[0].a_perm = lacl[1].a_perm;
if (pos > nentries)
{
}
};
-
#define MT_INTERFACE user_data->threadinterface
extern "C"