#include <string.h>#if __GNUC__ < 4#define restrict#endifchar *strncat(char *restrict d, const char *restrict s, size_t n){char *a = d;d += strlen(d);while (n && *s) n--, *d++ = *s++;*d++ = 0;return a;}
#include <string.h>#if __GNUC__ < 4#define restrict#endifchar *strncat(char *restrict d, const char *restrict s, size_t n){char *a = d;d += strlen(d);while (n && *s) n--, *d++ = *s++;*d++ = 0;return a;}