Mercurial > hg > CbC > CbC_gcc
comparison libssp/memmove-chk.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | a06113de4d67 |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 /* Checking memmove. | 1 /* Checking memmove. |
2 Copyright (C) 2005, 2009 Free Software Foundation, Inc. | 2 Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify it under | 6 GCC is free software; you can redistribute it and/or modify it under |
7 the terms of the GNU General Public License as published by the Free | 7 the terms of the GNU General Public License as published by the Free |
38 # include <string.h> | 38 # include <string.h> |
39 #endif | 39 #endif |
40 | 40 |
41 extern void __chk_fail (void) __attribute__((__noreturn__)); | 41 extern void __chk_fail (void) __attribute__((__noreturn__)); |
42 | 42 |
43 #ifdef HAVE_MEMPCPY | 43 #ifdef HAVE_MEMMOVE |
44 void * | 44 void * |
45 __memmove_chk (void *dest, const void *src, size_t len, size_t slen) | 45 __memmove_chk (void *dest, const void *src, size_t len, size_t slen) |
46 { | 46 { |
47 if (len > slen) | 47 if (len > slen) |
48 __chk_fail (); | 48 __chk_fail (); |