From 0007fbf866de133eba3046c87ab3837ce9aa10e7 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Tue, 25 Nov 2003 16:08:38 +0000 Subject: [PATCH] Add "missing" functions that (to the best of my knowledge) are never actually used in SM. --- stepmania/src/archutils/Darwin/wchar.cpp | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 stepmania/src/archutils/Darwin/wchar.cpp diff --git a/stepmania/src/archutils/Darwin/wchar.cpp b/stepmania/src/archutils/Darwin/wchar.cpp new file mode 100644 index 0000000000..18571e4d8c --- /dev/null +++ b/stepmania/src/archutils/Darwin/wchar.cpp @@ -0,0 +1,46 @@ +/* + * wchar.cpp + * stepmania + * + * Created by Steve Checkoway on Tue Nov 25 2003. + * Copyright (c) 2003 Steve Checkoway. All rights reserved. + * + */ + +/* + * Since I cannot use the header beacuse Apple decided to be really + * stupid when it released the old SDKs, I'm going to write really bad + * implementations for a few functions since they are not actually used + * anywhere in StepMania (I hope). If the need arises, I can write real + * real functions for these. + */ + +#define _BSD_WCHAR_T_DEFINED_ +#include + +#define CRASH(x) *(char*)0=0; return x +extern "C" { +#ifndef wcslen +size_t wcslen(const wchar_t *w) { CRASH(0); } +#endif + +#ifndef wmemchr +wchar_t *wmemchr(const wchar_t *w1, wchar_t w2, size_t s) { CRASH(NULL); } +#endif + +#ifndef wmemcmp +int wmemcmp(const wchar_t *w1, const wchar_t *w2, size_t s) { CRASH(0); } +#endif + +#ifndef wmemcpy +wchar_t *wmemcpy(wchar_t *dst, const wchar_t *src, size_t s) { CRASH(NULL); } +#endif + +#ifndef wmemmove +wchar_t *wmemmove(wchar_t *dst, const wchar_t *src, size_t s) { CRASH(NULL); } +#endif + +#ifndef wmemset +wchar_t *wmemset(wchar_t *w1 , wchar_t w, size_t s) { CRASH(NULL); } +#endif +}