pidgin/win32/gtkwin32dep.h

Wed, 25 Oct 2023 20:26:35 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Wed, 25 Oct 2023 20:26:35 -0500
changeset 42410
563e7a17c220
parent 41885
973533570200
child 43085
b349c302413c
permissions
-rw-r--r--

Fix possible clash of config headers

Both GLib and GStreamer have a config file called `config.h` and use the `HAVE_CONFIG_H` macro to conditionally include them.

Normally, this works out fine, but if they are subprojects, we may accidentally trigger including a different `config.h`. This is normally harmless, but it causes a bunch of warnings because we define `GETTEXT_PACKAGE` on the command-line, and it won't match the one in a different project.

However, we only include this file in source files, not headers, and it's always created, so there's no need to conditionally include it or define the macro. We can also rename it so it can't clash with other instances as well.

Testing Done:
Compiled with subprojects and stopped seeing many warnings about `GETTEXT_PACKAGE` and other generic variables being re-defined due to GStreamer's `config.h`.

Reviewed at https://reviews.imfreedom.org/r/2707/

/*
 * Pidgin is the legal property of its developers, whose names are too numerous
 * to list here.  Please refer to the COPYRIGHT file distributed with this
 * source distribution
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
 */
#ifndef _GTKWIN32DEP_H_
#define _GTKWIN32DEP_H_

#include <windows.h>
#include <gtk/gtk.h>

#include <purple.h>

HINSTANCE winpidgin_dll_hinstance(void);
HINSTANCE winpidgin_exe_hinstance(void);
void winpidgin_set_exe_hinstance(HINSTANCE hint);

/* Misc */
DWORD winpidgin_get_lastactive(void);

/* init / cleanup */
void winpidgin_init(void);
void winpidgin_cleanup(void);

#endif /* _GTKWIN32DEP_H_ */

mercurial