MC WIN32 build ... gcc'ish
- From: adamyg <adamyg gmail com>
- To: mc-devel gnome org
- Subject: MC WIN32 build ... gcc'ish
- Date: Thu, 02 Aug 2012 21:34:41 -0000
Having used an old WIN32 native build version for years (4.6.x) I've recently moved forward and built a native WIN32 version against a current mc-4.8.4 stable snapshot.
Generally the version is stable (internal editor, most of the vfs subsystem etc), yet porting raised a number of issues which shall create problems if these changes are to be released.
The two compiler related issues are visible (i.e. non gcc), firstly use of 'void *' calculations (minor) and secondary non-const structure initialisation, specifically the QUICK_xxxx 
macros which represent numerous changes across the source tree, see below. 
        QuickWidget quick_widgets[] = {
            /* 0 */ QUICK_BUTTON (0, dlg_width, dlg_height, dlg_height, N_("&Cancel"), B_CANCEL, NULL),
            /* 1 */ QUICK_BUTTON (0, dlg_width, dlg_height, dlg_height, N_("&OK"), B_ENTER, NULL),
            /* 2 */ QUICK_CHECKBOX (0, dlg_width, 5, dlg_height, N_("&Reverse"), &info->reverse),
            /* 3 */ QUICK_CHECKBOX (0, dlg_width, 4, dlg_height, N_("Case sensi&tive"), &info->case_sensitive),
            /* 4 */ QUICK_CHECKBOX (0, dlg_width, 3, dlg_height, N_("Executable &first"), &info->exec_first),
            /* 5 */ QUICK_RADIO (4, dlg_width, 3, dlg_height, 0, NULL, &sort_idx),
            QUICK_END
        };which needed to be replaced (current solution as follows):
        QuickWidget quick_widgets[7], *quick_cursor = quick_widgets;
        quick_cursor = /* 0 */ QUICK_PUSH_BUTTON (quick_cursor, 0, dlg_width, dlg_height, dlg_height, N_("&Cancel"), B_CANCEL, NULL);
        quick_cursor = /* 1 */ QUICK_PUSH_BUTTON (quick_cursor, 0, dlg_width, dlg_height, dlg_height, N_("&OK"), B_ENTER, NULL);
        quick_cursor = /* 2 */ QUICK_PUSH_CHECKBOX (quick_cursor, 0, dlg_width, 5, dlg_height, N_("&Reverse"), &info->reverse);
        quick_cursor = /* 3 */ QUICK_PUSH_CHECKBOX (quick_cursor, 0, dlg_width, 4, dlg_height, N_("Case sensi&tive"), &info->case_sensitive);
        quick_cursor = /* 4 */ QUICK_PUSH_CHECKBOX (quick_cursor, 0, dlg_width, 3, dlg_height, N_("Executable &first"), &info->exec_first);
        quick_cursor = /* 5 */ QUICK_PUSH_RADIO (quick_cursor, 4, dlg_width, 3, dlg_height, 0, NULL, &sort_idx);
        quick_cursor = QUICK_PUSH_END (quick_cursor);
        g_assert(quick_cursor == quick_widgets + G_N_ELEMENTS(quick_widgets));            Note: the QUICK_PUSH_xxxx inline functions simply wrap the QUICK_xxxx macros.
Firstly that are the thoughts on an active native WIN32 build and secondary can these compiler'ish be reworked to support non gcc builds ?
Excluding these changes WIN32 support (so far) represents around 20 patches mainly for drive and alt-configuration options,
plus a number of new modules to emulate posix functions, built against libglib-2.0 from gtk.
Comments
Regards
Attachment:
screen1.bmp
Description: Windows bitmap
[Date Prev][Date Next]   [Thread Prev][Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]