mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
Update.
* sysdeps/unix/sysv/linux/i386/shmctl.c: Fix handling of save_errno.
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
2000-02-11 Ulrich Drepper <drepper@redhat.com>
|
2000-02-11 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/i386/shmctl.c: Fix handling of save_errno.
|
||||||
|
|
||||||
* locale/langinfo.h: Make CRNCYSTR a separate entry instead of an
|
* locale/langinfo.h: Make CRNCYSTR a separate entry instead of an
|
||||||
alias for CURRENCY_SYMBOL.
|
alias for CURRENCY_SYMBOL.
|
||||||
* locale/programs/ld-monetary.c: Add support to write out CRNCYSTR
|
* locale/programs/ld-monetary.c: Add support to write out CRNCYSTR
|
||||||
|
@@ -1202,7 +1202,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
|
|||||||
int from_level;
|
int from_level;
|
||||||
int to_level;
|
int to_level;
|
||||||
#ifdef COMPILE_WPRINTF
|
#ifdef COMPILE_WPRINTF
|
||||||
const wchar_t *wcdigits;
|
const wchar_t *wcdigits[10];
|
||||||
#else
|
#else
|
||||||
const char *mbdigits[10];
|
const char *mbdigits[10];
|
||||||
#endif
|
#endif
|
||||||
@@ -1221,19 +1221,19 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
|
|||||||
and also perform the first round of comparisons. */
|
and also perform the first round of comparisons. */
|
||||||
for (n = 0; n < 10; ++n)
|
for (n = 0; n < 10; ++n)
|
||||||
{
|
{
|
||||||
size_t dlen;
|
|
||||||
size_t dcnt;
|
|
||||||
|
|
||||||
/* Get the string for the digits with value N. */
|
/* Get the string for the digits with value N. */
|
||||||
#ifdef COMPILE_WPRINTF
|
#ifdef COMPILE_WPRINTF
|
||||||
wcdigits[n] = _NL_CURRENT (LC_CTYPE,
|
wcdigits[n] = (const wchar_t *)
|
||||||
_NL_CTYPE_INDIGITS0_WC + n);
|
_NL_CURRENT (LC_CTYPE, _NL_CTYPE_INDIGITS0_WC + n);
|
||||||
if (c == *wcdigit[n])
|
if (c == *wcdigits[n])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Advance the pointer to the next string. */
|
/* Advance the pointer to the next string. */
|
||||||
++wcdigits[n];
|
++wcdigits[n];
|
||||||
#else
|
#else
|
||||||
|
size_t dlen;
|
||||||
|
size_t dcnt;
|
||||||
|
|
||||||
mbdigits[n] = _NL_CURRENT (LC_CTYPE,
|
mbdigits[n] = _NL_CURRENT (LC_CTYPE,
|
||||||
_NL_CTYPE_INDIGITS0_MB + n);
|
_NL_CTYPE_INDIGITS0_MB + n);
|
||||||
dlen = strlen (mbdigits[n]);
|
dlen = strlen (mbdigits[n]);
|
||||||
@@ -1253,8 +1253,8 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
|
|||||||
|
|
||||||
/* Advance the pointer to the next string. */
|
/* Advance the pointer to the next string. */
|
||||||
mbdigits[n] += dlen + 1;
|
mbdigits[n] += dlen + 1;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (n == 10)
|
if (n == 10)
|
||||||
{
|
{
|
||||||
@@ -1265,7 +1265,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
|
|||||||
for (n = 0; n < 10; ++n)
|
for (n = 0; n < 10; ++n)
|
||||||
{
|
{
|
||||||
#ifdef COMPILE_WPRINTF
|
#ifdef COMPILE_WPRINTF
|
||||||
if (c == *wcdigit[n])
|
if (c == *wcdigits[n])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Advance the pointer to the next string. */
|
/* Advance the pointer to the next string. */
|
||||||
|
@@ -80,24 +80,23 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
|
|||||||
case SHM_STAT:
|
case SHM_STAT:
|
||||||
case IPC_STAT:
|
case IPC_STAT:
|
||||||
case IPC_SET:
|
case IPC_SET:
|
||||||
#if __WORDSIZE != 32
|
# if __WORDSIZE != 32
|
||||||
case IPC_INFO:
|
case IPC_INFO:
|
||||||
#endif
|
# endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, buf);
|
return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
int save_errno = result;
|
|
||||||
struct __old_shmid_ds old;
|
struct __old_shmid_ds old;
|
||||||
|
|
||||||
#ifdef __NR_getuid32
|
# ifdef __NR_getuid32
|
||||||
if (__libc_missing_32bit_uids <= 0)
|
if (__libc_missing_32bit_uids <= 0)
|
||||||
{
|
{
|
||||||
if (__libc_missing_32bit_uids < 0)
|
if (__libc_missing_32bit_uids < 0)
|
||||||
{
|
{
|
||||||
save_errno = errno;
|
int save_errno = errno;
|
||||||
|
|
||||||
/* Test presence of new IPC by testing for getuid32 syscall. */
|
/* Test presence of new IPC by testing for getuid32 syscall. */
|
||||||
result = INLINE_SYSCALL (getuid32, 0);
|
result = INLINE_SYSCALL (getuid32, 0);
|
||||||
@@ -113,7 +112,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
if (cmd == IPC_SET)
|
if (cmd == IPC_SET)
|
||||||
{
|
{
|
||||||
@@ -146,7 +145,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
|
|||||||
buf->shm_cpid = old.shm_cpid;
|
buf->shm_cpid = old.shm_cpid;
|
||||||
buf->shm_lpid = old.shm_lpid;
|
buf->shm_lpid = old.shm_lpid;
|
||||||
}
|
}
|
||||||
#if __WORDSIZE != 32
|
# if __WORDSIZE != 32
|
||||||
else if (result != -1 && cmd == IPC_INFO)
|
else if (result != -1 && cmd == IPC_INFO)
|
||||||
{
|
{
|
||||||
struct __old_shminfo *oldi = (struct __old_shminfo *)&old;
|
struct __old_shminfo *oldi = (struct __old_shminfo *)&old;
|
||||||
@@ -159,7 +158,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
|
|||||||
i->shmseg = oldi->shmseg;
|
i->shmseg = oldi->shmseg;
|
||||||
i->shmall = oldi->shmall;
|
i->shmall = oldi->shmall;
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user