1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-05-12 01:42:21 +08:00
mbedtls/programs/wince_main.c
Felix Conway 998760ae5d Define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS in every sample program
Add #define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS to every sample program
before the first include so that mbedtls doesn't break with future
privatization work.

Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-03-24 11:37:33 +00:00

34 lines
668 B
C

/*
* Windows CE console application entry point
*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/
#if defined(_WIN32_WCE)
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
#include <windows.h>
extern int main(int, const char **);
int _tmain(int argc, _TCHAR *targv[])
{
char **argv;
int i;
argv = (char **) calloc(argc, sizeof(char *));
for (i = 0; i < argc; i++) {
size_t len;
len = _tcslen(targv[i]) + 1;
argv[i] = (char *) calloc(len, sizeof(char));
wcstombs(argv[i], targv[i], len);
}
return main(argc, argv);
}
#endif /* defined(_WIN32_WCE) */