summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-20 10:52:04 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-20 10:52:04 +0100
commit83853b9c86ee867f743b6b1827c6eb6b3a5c21d5 (patch)
tree5f48d86ed09b2d92955ff57ae8ff80f691ead207
parente7057033beafedb857c45d5b32d9622b0ce545e8 (diff)
Just use plain memcpy
Change-Id: I6f2014f3dfc650a61e8c0dc0bb7d7d4fdb88dbe9
-rw-r--r--hwpfilter/source/grammar.cxx50
1 files changed, 3 insertions, 47 deletions
diff --git a/hwpfilter/source/grammar.cxx b/hwpfilter/source/grammar.cxx
index 93e732983c0d..bfde898d667c 100644
--- a/hwpfilter/source/grammar.cxx
+++ b/hwpfilter/source/grammar.cxx
@@ -459,50 +459,6 @@ int yydebug; /* nonzero means print parse trace */
#define YYMAXDEPTH 10000
#endif
-/* Define __yy_memcpy. Note that the size argument
- should be passed with type unsigned int, because that is what the non-GCC
- definitions require. With GCC, __builtin_memcpy takes an arg
- of type size_t, but it can handle unsigned int. */
-
-#if defined(__GNUC__)
-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
-#else
-#ifndef __cplusplus
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (to, from, count)
- char *to;
- char *from;
- unsigned int count;
-{
- char *f = from;
- char *t = to;
- int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#else /* __cplusplus */
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (char *to, char *from, unsigned int count)
-{
- char *t = to;
- char *f = from;
- int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#endif
-#endif
-
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
@@ -660,14 +616,14 @@ yynewstate:
yyfree_stacks = 1;
#endif
yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
- __yy_memcpy (yyss, yyss1,
+ memcpy (yyss, yyss1,
size * (unsigned int) sizeof (*yyssp));
yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
- __yy_memcpy (yyvs, yyvs1,
+ memcpy (yyvs, yyvs1,
size * (unsigned int) sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1,
+ memcpy ((char *)yyls, (char *)yyls1,
size * (unsigned int) sizeof (*yylsp));
#endif
#endif /* no yyoverflow */