forked from osmocom/wireshark
e2e5b01d77
Restore the "main" name since that is used everywhere else except for Windows. On Windows, "main" is renamed via a macro to avoid a conflict with "wmain" and to allow it to be called in cli_main.c. For those wondering, GUI applications (such as Qt) have a different entry point, namely WinMain. In Qt5, src/winmain/qtmain_win.cpp defines WinMain, but seems to convert its arguments from Unicode to CP_ACP (ASCII). It might not support UTF-8, but I did not verify this. Change-Id: I93fa59324eb2ef95a305b08fc5ba34d49cc73bf0 Reviewed-on: https://code.wireshark.org/review/31208 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
22 lines
681 B
C
22 lines
681 B
C
/*
|
|
* Declaration of the real main routine, for all CLI programs where the
|
|
* main routine should get UTF-8 arguments on Windows. In those programs,
|
|
* in the file that defines the main routine, include this header and link
|
|
* those programs with cli_main.c.
|
|
*
|
|
* This is used in software licensed under the GPLv2, and its license MUST
|
|
* be compatible with that license.
|
|
*
|
|
* This is used in software licensed under the Apache 2.0 license, and its
|
|
* license MUST be compatible with that license.
|
|
*
|
|
* For that purpose, we use the MIT (X11) license.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#ifdef _WIN32
|
|
int real_main(int argc, char *argv[]);
|
|
#define main real_main
|
|
#endif
|