mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-25 13:41:45 +00:00
* Add strneq() (streq only n chars) macro
* fix return type of xstrdup.
This commit is contained in:
parent
e3d0d562da
commit
1e0513335f
2 changed files with 3 additions and 1 deletions
2
make.h
2
make.h
|
@ -298,6 +298,8 @@ extern char *alloca ();
|
|||
# define strieq(a, b) (strcmp ((a), (b)) == 0)
|
||||
#endif
|
||||
|
||||
#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
|
||||
|
||||
/* Add to VAR the hashing value of C, one character in a name. */
|
||||
#define HASH(var, c) \
|
||||
((var += (c)), (var = ((var) << 7) + ((var) >> 20)))
|
||||
|
|
2
misc.c
2
misc.c
|
@ -379,7 +379,7 @@ xrealloc (ptr, size)
|
|||
}
|
||||
|
||||
|
||||
const char *
|
||||
char *
|
||||
xstrdup (ptr)
|
||||
const char *ptr;
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue