openbsd-ports/games/xevil/patches/patch-cmn_utils_h
espie 65c6d6d7a0 let it build with clang: newer includes, don't warn on xpm (too noisy)
fix nonsense in introduced patches (unsigned intptr_t indeed!)
2017-05-02 23:26:32 +00:00

33 lines
1.0 KiB
Plaintext

$OpenBSD: patch-cmn_utils_h,v 1.1 2017/05/02 23:26:32 espie Exp $
If you're going to wrap C++ functions, you need both const correct wrappers.
Index: cmn/utils.h
--- cmn/utils.h.orig
+++ cmn/utils.h
@@ -237,13 +237,22 @@ class Utils {
/* EFFECTS: Wrapper for C library strcmp(). Return 0 if strings are the
same. */
- static char* strchr(const char* cs,int c)
+ static const char* strchr(const char* cs,int c)
{return ::strchr(cs,c);}
- static char* strrchr(const char* cs,int c)
+ static const char* strrchr(const char* cs,int c)
{return ::strrchr(cs,c);}
- static char* strstr(const char* cs,const char* ct)
+ static const char* strstr(const char* cs,const char* ct)
+ {return ::strstr(cs,ct);}
+
+ static char* strchr(char* cs,int c)
+ {return ::strchr(cs,c);}
+
+ static char* strrchr(char* cs,int c)
+ {return ::strrchr(cs,c);}
+
+ static char* strstr(char* cs,const char* ct)
{return ::strstr(cs,ct);}
static void strcpy(char* s,const char* ct)