Remove strneq macro and use startswith.
bfd/ChangeLog: * ecoff.c (strneq): Remove strneq and use startswith. (_bfd_ecoff_slurp_armap): Likewise. binutils/ChangeLog: * elfcomm.h (strneq): Remove strneq and use startswith. * readelf.c (ia64_process_unwind): Likewise. (process_note): Likewise. gas/ChangeLog: * config/obj-coff.c (strneq): Remove strneq and use startswith. (weak_is_altname): Likewise. (obj_coff_section): Likewise. * config/tc-cr16.c (process_label_constant): Likewise. * config/tc-crx.c (strneq): Likewise. include/ChangeLog: * opcode/cr16.h (strneq): Remove strneq and use startswith. ld/ChangeLog: * ldbuildid.c (strneq): Remove strneq and use startswith. (validate_build_id_style): Likewise. (compute_build_id_size): Likewise. opcodes/ChangeLog: * arm-dis.c (strneq): Remove strneq and use startswith. * cr16-dis.c (print_insn_cr16): Likewise. * score-dis.c (streq): Likewise. (strneq): Likewise. * score7-dis.c (strneq): Likewise.
This commit is contained in:
parent
d34049e8bb
commit
e9b095a538
@ -1,3 +1,8 @@
|
|||||||
|
2021-04-01 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
* ecoff.c (strneq): Remove strneq and use startswith.
|
||||||
|
(_bfd_ecoff_slurp_armap): Likewise.
|
||||||
|
|
||||||
2021-04-01 Martin Liska <mliska@suse.cz>
|
2021-04-01 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
* elf-bfd.h (bfd_section_is_ctf): Use startswith function.
|
* elf-bfd.h (bfd_section_is_ctf): Use startswith function.
|
||||||
|
|||||||
@ -46,7 +46,6 @@
|
|||||||
#include "libiberty.h"
|
#include "libiberty.h"
|
||||||
|
|
||||||
#define streq(a, b) (strcmp ((a), (b)) == 0)
|
#define streq(a, b) (strcmp ((a), (b)) == 0)
|
||||||
#define strneq(a, b, n) (strncmp ((a), (b), (n)) == 0)
|
|
||||||
|
|
||||||
|
|
||||||
/* This stuff is somewhat copied from coffcode.h. */
|
/* This stuff is somewhat copied from coffcode.h. */
|
||||||
@ -2870,14 +2869,14 @@ _bfd_ecoff_slurp_armap (bfd *abfd)
|
|||||||
return bfd_slurp_armap (abfd);
|
return bfd_slurp_armap (abfd);
|
||||||
|
|
||||||
/* See if the first element is an armap. */
|
/* See if the first element is an armap. */
|
||||||
if (! strneq (nextname, ecoff_backend (abfd)->armap_start, ARMAP_START_LENGTH)
|
if (strncmp (nextname, ecoff_backend (abfd)->armap_start, ARMAP_START_LENGTH) != 0
|
||||||
|| nextname[ARMAP_HEADER_MARKER_INDEX] != ARMAP_MARKER
|
|| nextname[ARMAP_HEADER_MARKER_INDEX] != ARMAP_MARKER
|
||||||
|| (nextname[ARMAP_HEADER_ENDIAN_INDEX] != ARMAP_BIG_ENDIAN
|
|| (nextname[ARMAP_HEADER_ENDIAN_INDEX] != ARMAP_BIG_ENDIAN
|
||||||
&& nextname[ARMAP_HEADER_ENDIAN_INDEX] != ARMAP_LITTLE_ENDIAN)
|
&& nextname[ARMAP_HEADER_ENDIAN_INDEX] != ARMAP_LITTLE_ENDIAN)
|
||||||
|| nextname[ARMAP_OBJECT_MARKER_INDEX] != ARMAP_MARKER
|
|| nextname[ARMAP_OBJECT_MARKER_INDEX] != ARMAP_MARKER
|
||||||
|| (nextname[ARMAP_OBJECT_ENDIAN_INDEX] != ARMAP_BIG_ENDIAN
|
|| (nextname[ARMAP_OBJECT_ENDIAN_INDEX] != ARMAP_BIG_ENDIAN
|
||||||
&& nextname[ARMAP_OBJECT_ENDIAN_INDEX] != ARMAP_LITTLE_ENDIAN)
|
&& nextname[ARMAP_OBJECT_ENDIAN_INDEX] != ARMAP_LITTLE_ENDIAN)
|
||||||
|| ! strneq (nextname + ARMAP_END_INDEX, ARMAP_END, sizeof ARMAP_END - 1))
|
|| strncmp (nextname + ARMAP_END_INDEX, ARMAP_END, sizeof ARMAP_END - 1) != 0)
|
||||||
{
|
{
|
||||||
abfd->has_armap = false;
|
abfd->has_armap = false;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -1,3 +1,9 @@
|
|||||||
|
2021-04-01 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
* elfcomm.h (strneq): Remove strneq and use startswith.
|
||||||
|
* readelf.c (ia64_process_unwind): Likewise.
|
||||||
|
(process_note): Likewise.
|
||||||
|
|
||||||
2021-04-01 Martin Liska <mliska@suse.cz>
|
2021-04-01 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
* dllwrap.c: Use startswith function.
|
* dllwrap.c: Use startswith function.
|
||||||
|
|||||||
@ -47,7 +47,6 @@ extern void byte_get_64 (const unsigned char *, elf_vma *, elf_vma *);
|
|||||||
|
|
||||||
/* This is just a bit of syntatic sugar. */
|
/* This is just a bit of syntatic sugar. */
|
||||||
#define streq(a,b) (strcmp ((a), (b)) == 0)
|
#define streq(a,b) (strcmp ((a), (b)) == 0)
|
||||||
#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
|
|
||||||
|
|
||||||
/* Structure to hold information about an archive file. */
|
/* Structure to hold information about an archive file. */
|
||||||
|
|
||||||
|
|||||||
@ -8235,8 +8235,8 @@ ia64_process_unwind (Filedata * filedata)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (SECTION_NAME_VALID (unwsec)
|
else if (SECTION_NAME_VALID (unwsec)
|
||||||
&& strneq (SECTION_NAME (unwsec),
|
&& startswith (SECTION_NAME (unwsec),
|
||||||
ELF_STRING_ia64_unwind_once, len))
|
ELF_STRING_ia64_unwind_once))
|
||||||
{
|
{
|
||||||
/* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.ia64unwi.FOO. */
|
/* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.ia64unwi.FOO. */
|
||||||
len2 = sizeof (ELF_STRING_ia64_unwind_info_once) - 1;
|
len2 = sizeof (ELF_STRING_ia64_unwind_info_once) - 1;
|
||||||
@ -8245,8 +8245,8 @@ ia64_process_unwind (Filedata * filedata)
|
|||||||
i < filedata->file_header.e_shnum;
|
i < filedata->file_header.e_shnum;
|
||||||
++i, ++sec)
|
++i, ++sec)
|
||||||
if (SECTION_NAME_VALID (sec)
|
if (SECTION_NAME_VALID (sec)
|
||||||
&& strneq (SECTION_NAME (sec),
|
&& startswith (SECTION_NAME (sec),
|
||||||
ELF_STRING_ia64_unwind_info_once, len2)
|
ELF_STRING_ia64_unwind_info_once)
|
||||||
&& streq (SECTION_NAME (sec) + len2, suffix))
|
&& streq (SECTION_NAME (sec) + len2, suffix))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -8258,13 +8258,13 @@ ia64_process_unwind (Filedata * filedata)
|
|||||||
len2 = sizeof (ELF_STRING_ia64_unwind_info) - 1;
|
len2 = sizeof (ELF_STRING_ia64_unwind_info) - 1;
|
||||||
suffix = "";
|
suffix = "";
|
||||||
if (SECTION_NAME_VALID (unwsec)
|
if (SECTION_NAME_VALID (unwsec)
|
||||||
&& strneq (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind, len))
|
&& startswith (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind))
|
||||||
suffix = SECTION_NAME (unwsec) + len;
|
suffix = SECTION_NAME (unwsec) + len;
|
||||||
for (i = 0, sec = filedata->section_headers;
|
for (i = 0, sec = filedata->section_headers;
|
||||||
i < filedata->file_header.e_shnum;
|
i < filedata->file_header.e_shnum;
|
||||||
++i, ++sec)
|
++i, ++sec)
|
||||||
if (SECTION_NAME_VALID (sec)
|
if (SECTION_NAME_VALID (sec)
|
||||||
&& strneq (SECTION_NAME (sec), ELF_STRING_ia64_unwind_info, len2)
|
&& startswith (SECTION_NAME (sec), ELF_STRING_ia64_unwind_info)
|
||||||
&& streq (SECTION_NAME (sec) + len2, suffix))
|
&& streq (SECTION_NAME (sec) + len2, suffix))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -20449,7 +20449,7 @@ process_note (Elf_Internal_Note * pnote,
|
|||||||
/* NetBSD-specific core file notes. */
|
/* NetBSD-specific core file notes. */
|
||||||
return process_netbsd_elf_note (pnote);
|
return process_netbsd_elf_note (pnote);
|
||||||
|
|
||||||
else if (strneq (pnote->namedata, "SPU/", 4))
|
else if (startswith (pnote->namedata, "SPU/"))
|
||||||
{
|
{
|
||||||
/* SPU-specific core file notes. */
|
/* SPU-specific core file notes. */
|
||||||
nt = pnote->namedata + 4;
|
nt = pnote->namedata + 4;
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
2021-04-01 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
* config/obj-coff.c (strneq): Remove strneq and use startswith.
|
||||||
|
(weak_is_altname): Likewise.
|
||||||
|
(obj_coff_section): Likewise.
|
||||||
|
* config/tc-cr16.c (process_label_constant): Likewise.
|
||||||
|
* config/tc-crx.c (strneq): Likewise.
|
||||||
|
|
||||||
2021-04-01 Martin Liska <mliska@suse.cz>
|
2021-04-01 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
* as.c (select_emulation_mode): Use startswith.
|
* as.c (select_emulation_mode): Use startswith.
|
||||||
|
|||||||
@ -33,7 +33,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define streq(a,b) (strcmp ((a), (b)) == 0)
|
#define streq(a,b) (strcmp ((a), (b)) == 0)
|
||||||
#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
|
|
||||||
|
|
||||||
/* I think this is probably always correct. */
|
/* I think this is probably always correct. */
|
||||||
#ifndef KEEP_RELOC_INFO
|
#ifndef KEEP_RELOC_INFO
|
||||||
@ -1058,7 +1057,7 @@ obj_coff_val (int ignore ATTRIBUTE_UNUSED)
|
|||||||
static int
|
static int
|
||||||
weak_is_altname (const char * name)
|
weak_is_altname (const char * name)
|
||||||
{
|
{
|
||||||
return strneq (name, weak_altprefix, sizeof (weak_altprefix) - 1);
|
return startswith (name, weak_altprefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the name of the alternate symbol
|
/* Return the name of the alternate symbol
|
||||||
@ -1667,7 +1666,7 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED)
|
|||||||
/* Add SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD to .gnu.linkonce
|
/* Add SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD to .gnu.linkonce
|
||||||
sections so adjust_reloc_syms in write.c will correctly handle
|
sections so adjust_reloc_syms in write.c will correctly handle
|
||||||
relocs which refer to non-local symbols in these sections. */
|
relocs which refer to non-local symbols in these sections. */
|
||||||
if (strneq (name, ".gnu.linkonce", sizeof (".gnu.linkonce") - 1))
|
if (startswith (name, ".gnu.linkonce"))
|
||||||
flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
|
flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -905,34 +905,34 @@ process_label_constant (char *str, ins * cr16_ins)
|
|||||||
cr16_ins->rtype = BFD_RELOC_NONE;
|
cr16_ins->rtype = BFD_RELOC_NONE;
|
||||||
relocatable = 1;
|
relocatable = 1;
|
||||||
|
|
||||||
if (strneq (input_line_pointer, "@c", 2))
|
if (startswith (input_line_pointer, "@c"))
|
||||||
symbol_with_at = 1;
|
symbol_with_at = 1;
|
||||||
|
|
||||||
if (strneq (input_line_pointer, "@l", 2)
|
if (startswith (input_line_pointer, "@l")
|
||||||
|| strneq (input_line_pointer, ":l", 2))
|
|| startswith (input_line_pointer, ":l"))
|
||||||
symbol_with_l = 1;
|
symbol_with_l = 1;
|
||||||
|
|
||||||
if (strneq (input_line_pointer, "@m", 2)
|
if (startswith (input_line_pointer, "@m")
|
||||||
|| strneq (input_line_pointer, ":m", 2))
|
|| startswith (input_line_pointer, ":m"))
|
||||||
symbol_with_m = 1;
|
symbol_with_m = 1;
|
||||||
|
|
||||||
if (strneq (input_line_pointer, "@s", 2)
|
if (startswith (input_line_pointer, "@s")
|
||||||
|| strneq (input_line_pointer, ":s", 2))
|
|| startswith (input_line_pointer, ":s"))
|
||||||
symbol_with_s = 1;
|
symbol_with_s = 1;
|
||||||
|
|
||||||
if (strneq (input_line_pointer, "@cGOT", 5)
|
if (startswith (input_line_pointer, "@cGOT")
|
||||||
|| strneq (input_line_pointer, "@cgot", 5))
|
|| startswith (input_line_pointer, "@cgot"))
|
||||||
{
|
{
|
||||||
if (GOT_symbol == NULL)
|
if (GOT_symbol == NULL)
|
||||||
GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
|
GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
|
||||||
|
|
||||||
symbol_with_at_gotc = 1;
|
symbol_with_at_gotc = 1;
|
||||||
}
|
}
|
||||||
else if (strneq (input_line_pointer, "@GOT", 4)
|
else if (startswith (input_line_pointer, "@GOT")
|
||||||
|| strneq (input_line_pointer, "@got", 4))
|
|| startswith (input_line_pointer, "@got"))
|
||||||
{
|
{
|
||||||
if ((strneq (input_line_pointer, "+", 1))
|
if ((startswith (input_line_pointer, "+"))
|
||||||
|| (strneq (input_line_pointer, "-", 1)))
|
|| (startswith (input_line_pointer, "-")))
|
||||||
as_warn (_("GOT bad expression with %s."), input_line_pointer);
|
as_warn (_("GOT bad expression with %s."), input_line_pointer);
|
||||||
|
|
||||||
if (GOT_symbol == NULL)
|
if (GOT_symbol == NULL)
|
||||||
|
|||||||
@ -43,7 +43,6 @@
|
|||||||
|
|
||||||
/* Utility macros for string comparison. */
|
/* Utility macros for string comparison. */
|
||||||
#define streq(a, b) (strcmp (a, b) == 0)
|
#define streq(a, b) (strcmp (a, b) == 0)
|
||||||
#define strneq(a, b, c) (strncmp (a, b, c) == 0)
|
|
||||||
|
|
||||||
/* Assign a number NUM, shifted by SHIFT bytes, into a location
|
/* Assign a number NUM, shifted by SHIFT bytes, into a location
|
||||||
pointed by index BYTE of array 'output_opcode'. */
|
pointed by index BYTE of array 'output_opcode'. */
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
2021-04-01 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
* opcode/cr16.h (strneq): Remove strneq and use startswith.
|
||||||
|
|
||||||
2021-03-31 Alan Modra <amodra@gmail.com>
|
2021-03-31 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* bfdlink.h: Replace bfd_boolean with bool throughout.
|
* bfdlink.h: Replace bfd_boolean with bool throughout.
|
||||||
|
|||||||
@ -425,7 +425,6 @@ extern const char * cr16_no_op_insn[];
|
|||||||
|
|
||||||
/* Utility macros for string comparison. */
|
/* Utility macros for string comparison. */
|
||||||
#define streq(a, b) (strcmp (a, b) == 0)
|
#define streq(a, b) (strcmp (a, b) == 0)
|
||||||
#define strneq(a, b, c) (strncmp (a, b, c) == 0)
|
|
||||||
|
|
||||||
/* Long long type handling. */
|
/* Long long type handling. */
|
||||||
/* Replace all appearances of 'long long int' with LONGLONG. */
|
/* Replace all appearances of 'long long int' with LONGLONG. */
|
||||||
|
|||||||
@ -1,3 +1,9 @@
|
|||||||
|
2021-04-01 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
* ldbuildid.c (strneq): Remove strneq and use startswith.
|
||||||
|
(validate_build_id_style): Likewise.
|
||||||
|
(compute_build_id_size): Likewise.
|
||||||
|
|
||||||
2021-03-31 Alan Modra <amodra@gmail.com>
|
2021-03-31 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* sysdep.h (POISON_BFD_BOOLEAN): Define.
|
* sysdep.h (POISON_BFD_BOOLEAN): Define.
|
||||||
|
|||||||
@ -30,13 +30,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define streq(a,b) strcmp ((a), (b)) == 0
|
#define streq(a,b) strcmp ((a), (b)) == 0
|
||||||
#define strneq(a,b,n) strncmp ((a), (b), (n)) == 0
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
validate_build_id_style (const char *style)
|
validate_build_id_style (const char *style)
|
||||||
{
|
{
|
||||||
if ((streq (style, "md5")) || (streq (style, "sha1"))
|
if ((streq (style, "md5")) || (streq (style, "sha1"))
|
||||||
|| (streq (style, "uuid")) || (strneq (style, "0x", 2)))
|
|| (streq (style, "uuid")) || (startswith (style, "0x")))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -51,7 +50,7 @@ compute_build_id_size (const char *style)
|
|||||||
if (streq (style, "sha1"))
|
if (streq (style, "sha1"))
|
||||||
return 160 / 8;
|
return 160 / 8;
|
||||||
|
|
||||||
if (strneq (style, "0x", 2))
|
if (startswith (style, "0x"))
|
||||||
{
|
{
|
||||||
bfd_size_type size = 0;
|
bfd_size_type size = 0;
|
||||||
/* ID is in string form (hex). Count the bytes. */
|
/* ID is in string form (hex). Count the bytes. */
|
||||||
@ -156,7 +155,7 @@ generate_build_id (bfd *abfd,
|
|||||||
(size_t) size < sizeof (UUID) ? (size_t) size : sizeof (UUID));
|
(size_t) size < sizeof (UUID) ? (size_t) size : sizeof (UUID));
|
||||||
#endif /* __MINGW32__ */
|
#endif /* __MINGW32__ */
|
||||||
}
|
}
|
||||||
else if (strneq (style, "0x", 2))
|
else if (startswith (style, "0x"))
|
||||||
{
|
{
|
||||||
/* ID is in string form (hex). Convert to bits. */
|
/* ID is in string form (hex). Convert to bits. */
|
||||||
const char *id = style + 2;
|
const char *id = style + 2;
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
2021-04-01 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
* arm-dis.c (strneq): Remove strneq and use startswith.
|
||||||
|
* cr16-dis.c (print_insn_cr16): Likewise.
|
||||||
|
* score-dis.c (streq): Likewise.
|
||||||
|
(strneq): Likewise.
|
||||||
|
* score7-dis.c (strneq): Likewise.
|
||||||
|
|
||||||
2021-04-01 Alan Modra <amodra@gmail.com>
|
2021-04-01 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 27675
|
PR 27675
|
||||||
|
|||||||
@ -39,11 +39,6 @@
|
|||||||
#include "elf/arm.h"
|
#include "elf/arm.h"
|
||||||
#include "mach-o.h"
|
#include "mach-o.h"
|
||||||
|
|
||||||
/* FIXME: Belongs in global header. */
|
|
||||||
#ifndef strneq
|
|
||||||
#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Cached mapping symbol state. */
|
/* Cached mapping symbol state. */
|
||||||
enum map_type
|
enum map_type
|
||||||
{
|
{
|
||||||
|
|||||||
@ -800,7 +800,7 @@ print_insn_cr16 (bfd_vma memaddr, struct disassemble_info *info)
|
|||||||
/* If found, print the instruction's mnemonic and arguments. */
|
/* If found, print the instruction's mnemonic and arguments. */
|
||||||
if (is_decoded > 0 && (cr16_words[0] != 0 || cr16_words[1] != 0))
|
if (is_decoded > 0 && (cr16_words[0] != 0 || cr16_words[1] != 0))
|
||||||
{
|
{
|
||||||
if (strneq (instruction->mnemonic, "cinv", 4))
|
if (startswith (instruction->mnemonic, "cinv"))
|
||||||
info->fprintf_func (info->stream,"%s",
|
info->fprintf_func (info->stream,"%s",
|
||||||
getcinvstring (instruction->mnemonic));
|
getcinvstring (instruction->mnemonic));
|
||||||
else
|
else
|
||||||
|
|||||||
@ -477,14 +477,6 @@ static struct score_opcode score_opcodes[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifndef streq
|
|
||||||
#define streq(a,b) (strcmp ((a), (b)) == 0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef strneq
|
|
||||||
#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NUM_ELEM
|
#ifndef NUM_ELEM
|
||||||
#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
|
#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -37,10 +37,6 @@
|
|||||||
#define streq(a,b) (strcmp ((a), (b)) == 0)
|
#define streq(a,b) (strcmp ((a), (b)) == 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef strneq
|
|
||||||
#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NUM_ELEM
|
#ifndef NUM_ELEM
|
||||||
#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
|
#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user