xref: /illumos-gate/usr/src/lib/libdwarf/common/memcpy_swap.h (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
1 /*
2     Copyright (C) 2018 David Anderson. All Rights Reserved.
3 
4     This program is free software; you can redistribute it
5     and/or modify it under the terms of version 2.1 of the
6     GNU Lesser General Public License as published by the
7     Free Software Foundation.
8 
9     This program is distributed in the hope that it would
10     be useful, but WITHOUT ANY WARRANTY; without even the
11     implied warranty of MERCHANTABILITY or FITNESS FOR A
12     PARTICULAR PURPOSE.
13 
14     Further, this software is distributed without any warranty
15     that it is free of the rightful claim of any third person
16     regarding infringement or the like.  Any license provided
17     herein, whether implied or otherwise, applies only to
18     this software file.  Patent licenses, if any, provided
19     herein do not apply to combinations of this program with
20     other software, or any other product whatsoever.
21 
22     You should have received a copy of the GNU Lesser General
23     Public License along with this program; if not, write
24     the Free Software Foundation, Inc., 51 Franklin Street -
25     Fifth Floor, Boston MA 02110-1301, USA.
26 */
27 
28 #ifndef MEMCPY_SWAP_H
29 #define MEMCPY_SWAP_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
34 
35 void _dwarf_memcpy_swap_bytes(void *s1, const void *s2, unsigned long len);
36 /*  It's inconvenient to use memcpy directly as it
37     uses size_t and that requires <stddef.h> */
38 void _dwarf_memcpy_noswap_bytes(void *s1, const void *s2, unsigned long len);
39 
40 #ifdef __cplusplus
41 }
42 #endif /* __cplusplus */
43 #endif /* MEMCPY_SWAP_H */
44