deskflow/src/lib/common/Common.h

44 lines
1,001 B
C
Raw Normal View History

2012-06-10 16:50:54 +00:00
/*
* Deskflow -- mouse and keyboard sharing utility
* SPDX-FileCopyrightText: (C) 2010 - 2018, 2024 - 2025 Symless Ltd.
* SPDX-FileCopyrightText: (C) 2002 - 2007 Chris Schoeneman
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
2012-06-10 16:50:54 +00:00
*/
#pragma once
2012-06-10 16:50:54 +00:00
#if defined(_WIN32)
#define SYSAPI_WIN32 1
#define WINAPI_MSWINDOWS 1
#elif HAVE_CONFIG_H
#include "Config.h"
2012-06-10 16:50:54 +00:00
#else
#error "config.h missing"
2012-06-10 16:50:54 +00:00
#endif
// define nullptr
2012-06-10 16:50:54 +00:00
#include <stddef.h>
// make assert available since we use it a lot
#include <assert.h>
2025-01-11 00:09:43 +00:00
#include <stdint.h>
#include <stdlib.h> // IWYU pragma: keep
#include <string.h> // IWYU pragma: keep
2012-06-10 16:50:54 +00:00
2025-01-11 02:14:00 +00:00
// defined in Carbon
#if !defined(__MACTYPES__)
#if defined(__APPLE__)
#include <CoreServices/CoreServices.h>
#else
#endif
#endif
enum
{
kExitSuccess = 0, // successful completion
kExitFailed = 1, // general failure
kExitTerminated = 2, // killed by signal
kExitArgs = 3, // bad arguments
kExitConfig = 4, // cannot read configuration
2012-06-10 16:50:54 +00:00
};