mirror of git://sourceware.org/git/glibc.git
entered into RCS
This commit is contained in:
parent
3120ef0231
commit
1cc063a780
|
|
@ -22,17 +22,24 @@ Cambridge, MA 02139, USA. */
|
||||||
#define SYS_brk 17
|
#define SYS_brk 17
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_GNU_LD
|
||||||
|
#define __end _end
|
||||||
|
#endif
|
||||||
|
|
||||||
.data
|
.data
|
||||||
.globl ___curbrk
|
.globl ___curbrk
|
||||||
___curbrk:
|
___curbrk:
|
||||||
#ifdef __GNU_STAB__
|
.long __end
|
||||||
.long ___end
|
|
||||||
#else
|
|
||||||
.long _end
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.text
|
.text
|
||||||
SYSCALL__ (brk)
|
ENTRY (__brk)
|
||||||
movl r0, ___curbrk
|
cmpl 4(ap), __end
|
||||||
|
bgeq 0f
|
||||||
|
movl __env, 4(ap)
|
||||||
|
0: chmk $SYS_brk
|
||||||
|
bcs 1f
|
||||||
|
movl 4(ap), ___curbrk
|
||||||
clrl r0
|
clrl r0
|
||||||
ret
|
ret
|
||||||
|
1:
|
||||||
|
jmp syscall_error
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
|
@ -22,12 +22,12 @@ Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
/* Copy no more than N bytes of SRC to DEST, stopping when C is found.
|
/* Copy no more than N bytes of SRC to DEST, stopping when C is found.
|
||||||
Return the position in DEST one byte past where C was copied,
|
Return the position in DEST one byte past where C was copied,
|
||||||
or NULL if C was not found in the first NBYTES bytes of SRC. */
|
or NULL if C was not found in the first N bytes of SRC. */
|
||||||
PTR
|
PTR
|
||||||
DEFUN(__memccpy, (dest, src, c, n),
|
DEFUN(__memccpy, (dest, src, c, n),
|
||||||
PTR dest AND CONST PTR src AND int c AND size_t nbytes)
|
PTR dest AND CONST PTR src AND int c AND size_t nbytes)
|
||||||
{
|
{
|
||||||
/* Except when NBYTES > 65535, this is what a hand-coded version would
|
/* Except when N > 65535, this is what a hand-coded version would
|
||||||
do anyway. */
|
do anyway. */
|
||||||
|
|
||||||
PTR found = memchr (src, c, n);
|
PTR found = memchr (src, c, n);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue