Skip to content

Commit

Permalink
* sysdeps/unix/sysv/linux/mips/bits/errno.h (ECANCELED,
Browse files Browse the repository at this point in the history
	EOWNERDEAD, ENOTRECOVERABLE): Define.

	* sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_REMOVE): Define.

	* sysdeps/mips/dl-machine.h (RTLD_START): Correct offsets for
	N64.

	* sysdeps/unix/sysv/linux/mips/bits/socket.h (struct msghdr): Use
	size_t for msg_controllen.
	(__cmsg_nxthdr): Correct test.
	(__SCM_CONNECT): Delete.
  • Loading branch information
Roland McGrath committed Jan 31, 2006
1 parent 18e2ac6 commit 27d7e3b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 12 deletions.
15 changes: 15 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
2006-01-29 Daniel Jacobowitz <dan@codesourcery.com>

* sysdeps/unix/sysv/linux/mips/bits/errno.h (ECANCELED,
EOWNERDEAD, ENOTRECOVERABLE): Define.

* sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_REMOVE): Define.

* sysdeps/mips/dl-machine.h (RTLD_START): Correct offsets for
N64.

* sysdeps/unix/sysv/linux/mips/bits/socket.h (struct msghdr): Use
size_t for msg_controllen.
(__cmsg_nxthdr): Correct test.
(__SCM_CONNECT): Delete.

2006-01-30 Alexandre Oliva <aoliva@redhat.com>
Roland McGrath <roland@redhat.com>

Expand Down
4 changes: 2 additions & 2 deletions sysdeps/mips/dl-machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,13 @@ do { \
" STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\
# Make sure the stack pointer is aligned for _dl_init_internal.\n\
and $2, $29, -2 * " STRINGXP(SZREG) "\n\
" STRINGXP(PTR_S) " $29, -4($2)\n\
" STRINGXP(PTR_S) " $29, -" STRINGXP(SZREG) "($2)\n\
" STRINGXP(PTR_SUBIU) " $29, $2, 32\n\
" STRINGXP(SAVE_GP(16)) "\n\
# Call the function to run the initializers.\n\
jal _dl_init_internal\n\
# Restore the stack pointer for _start.\n\
" STRINGXP(PTR_L) " $29, 28($29)\n\
" STRINGXP(PTR_L) " $29, 32-" STRINGXP(SZREG) "($29)\n\
# Pass our finalizer function to the user in $2 as per ELF ABI.\n\
" STRINGXP(PTR_LA) " $2, _dl_fini\n\
# Jump to the user entry point.\n\
Expand Down
13 changes: 12 additions & 1 deletion sysdeps/unix/sysv/linux/mips/bits/errno.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* Error constants. MIPS/Linux specific version.
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -27,6 +28,16 @@
/* Linux has no ENOTSUP error code. */
# define ENOTSUP EOPNOTSUPP

# ifndef ECANCELED
# define ECANCELED 158
# endif

/* Support for error codes to support robust mutexes was added later, too. */
# ifndef EOWNERDEAD
# define EOWNERDEAD 165
# define ENOTRECOVERABLE 166
# endif

# ifndef __ASSEMBLER__
/* Function to get address of global `errno' variable. */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
Expand Down
4 changes: 3 additions & 1 deletion sysdeps/unix/sysv/linux/mips/bits/mman.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* Definitions for POSIX memory map interface. Linux/MIPS version.
Copyright (C) 1997, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -84,6 +85,7 @@
#define MADV_SEQUENTIAL 2 /* read-ahead aggressively */
#define MADV_WILLNEED 3 /* pre-fault pages */
#define MADV_DONTNEED 4 /* discard these pages */
#define MADV_REMOVE 5 /* remove these pages & resources */
#endif

/* Flags for `mremap'. */
Expand Down
15 changes: 7 additions & 8 deletions sysdeps/unix/sysv/linux/mips/bits/socket.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* System-specific socket constants and types. Linux/MIPS version.
Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -222,7 +222,7 @@ struct msghdr
size_t msg_iovlen; /* Number of elements in the vector. */

void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
socklen_t msg_controllen; /* Ancillary data buffer length. */
size_t msg_controllen; /* Ancillary data buffer length. */

int msg_flags; /* Flags on received message. */
};
Expand Down Expand Up @@ -270,8 +270,8 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))

__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ CMSG_ALIGN (__cmsg->cmsg_len));
if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
+ __mhdr->msg_controllen)
if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+ __mhdr->msg_controllen)
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
Expand All @@ -284,13 +284,12 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
<linux/socket.h>. */
enum
{
SCM_RIGHTS = 0x01, /* Transfer file descriptors. */
SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
#define SCM_RIGHTS SCM_RIGHTS
#ifdef __USE_BSD
SCM_CREDENTIALS = 0x02, /* Credentials passing. */
, SCM_CREDENTIALS = 0x02 /* Credentials passing. */
# define SCM_CREDENTIALS SCM_CREDENTIALS
#endif
__SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */
};

/* User visible structure for SCM_CREDENTIALS message */
Expand Down

0 comments on commit 27d7e3b

Please sign in to comment.