libroot: define restrict for GCC < 4.
Should fix GCC 2 build.
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#if __GNUC__ < 4
|
||||||
|
#define restrict
|
||||||
|
#endif
|
||||||
|
|
||||||
char *strcat(char *restrict dest, const char *restrict src)
|
char *strcat(char *restrict dest, const char *restrict src)
|
||||||
{
|
{
|
||||||
strcpy(dest + strlen(dest), src);
|
strcpy(dest + strlen(dest), src);
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#if __GNUC__ < 4
|
||||||
|
#define restrict
|
||||||
|
#endif
|
||||||
|
|
||||||
char *strncat(char *restrict d, const char *restrict s, size_t n)
|
char *strncat(char *restrict d, const char *restrict s, size_t n)
|
||||||
{
|
{
|
||||||
char *a = d;
|
char *a = d;
|
||||||
|
|||||||
Reference in New Issue
Block a user