diff options
author | Karl Williamson <khw@cpan.org> | 2017-02-19 22:14:53 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-02-19 22:45:00 -0700 |
commit | 8f71649941d02d5bdfe4fed5054c505b12dd2c0e (patch) | |
tree | fa840bf246cda46241f012b3a9d728ee3f674b4f /handy.h | |
parent | 2d5e9bac83412e103d6b07a688dd7aea80148bd8 (diff) | |
download | perl-8f71649941d02d5bdfe4fed5054c505b12dd2c0e.tar.gz |
handy.h: Guard controversial macro name
This is so their use cannot spread easily until we have sorted things
out in 5.27
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -485,8 +485,13 @@ Returns zero if non-equal, or non-zero if equal. #define strnNE(s1,s2,l) (strncmp(s1,s2,l)) #define strnEQ(s1,s2,l) (!strncmp(s1,s2,l)) +/* These names are controversial, so guarding against their being used in more + * places than they already are. strBEGs and StrStartsWith are potential + * candidates */ +#if defined(PERL_IN_DOIO_C) || defined(PERL_IN_GV_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_LOCALE_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_TOKE_C) || defined(PERL_EXT) #define strNEs(s1,s2) (strncmp(s1,"" s2 "", sizeof(s2)-1)) #define strEQs(s1,s2) (!strncmp(s1,"" s2 "", sizeof(s2)-1)) +#endif #ifdef HAS_MEMCMP # define memNE(s1,s2,l) (memcmp(s1,s2,l)) |