1// Protocol Buffers - Google's data interchange format 2// Copyright 2023 Google Inc. All rights reserved. 3// 4// Use of this source code is governed by a BSD-style 5// license that can be found in the LICENSE file or at 6// https://developers.google.com/open-source/licenses/bsd 7 8syntax = "proto3"; 9 10package protobuf_unittest; 11 12option csharp_namespace = "ProtobufUnittest"; 13option java_multiple_files = true; 14option java_package = "com.google.protobuf.testing.proto"; 15 16// `google/protobuf/port_def.inc` #undef's a number of inconvenient macros 17// defined in system headers under varying circumstances. The code generated 18// from this file will not compile if those `#undef` calls are accidentally 19// removed. 20 21// This generates `GID_MAX`, which is a macro in some circumstances. 22enum GID { 23 GID_UNUSED = 0; 24} 25 26// This generates `UID_MAX`, which is a mcro in some circumstances. 27enum UID { 28 UID_UNUSED = 0; 29} 30 31// Just a container for bad macro names. Some of these do not follow the normal 32// naming conventions, this is intentional, we just want to trigger a build 33// failure if the macro is left defined. 34enum BadNames { 35 // autoheader defines this in some circumstances. 36 PACKAGE = 0; 37 // The comment says "a few common headers define this". 38 PACKED = 1; 39 // Defined in many Linux system headers. 40 linux = 2; 41 // This is often a macro in `<math.h>`. 42 DOMAIN = 3; 43 // These are defined in both Windows and macOS headers. 44 TRUE = 4; 45 FALSE = 5; 46 // Sometimes defined in Windows system headers. 47 CREATE_NEW = 6; 48 DELETE = 7; 49 DOUBLE_CLICK = 8; 50 ERROR = 9; 51 ERROR_BUSY = 10; 52 ERROR_INSTALL_FAILED = 11; 53 ERROR_NOT_FOUND = 12; 54 GetClassName = 13; 55 GetCurrentTime = 14; 56 GetMessage = 15; 57 GetObject = 16; 58 IGNORE = 17; 59 IN = 18; 60 INPUT_KEYBOARD = 19; 61 NO_ERROR = 20; 62 OUT = 21; 63 OPTIONAL = 22; 64 NEAR = 23; 65 NO_DATA = 24; 66 REASON_UNKNOWN = 25; 67 SERVICE_DISABLED = 26; 68 SEVERITY_ERROR = 27; 69 STATUS_PENDING = 28; 70 STRICT = 29; 71 // Sometimed defined in macOS system headers. 72 TYPE_BOOL = 30; 73 // Defined in macOS, Windows, and Linux headers. 74 DEBUG = 31; 75} 76