Skip to content

Commit

Permalink
Don't define __STDC_{FORMAT,LIMIT}_MACROS (#32542)
Browse files Browse the repository at this point in the history
* Don't define __STDC_{FORMAT,LIMIT}_MACROS

The need for this workaround was removed in glibc years ago.

See https://sourceware.org/bugzilla/show_bug.cgi?id=15366

* restyle
  • Loading branch information
ksperling-apple authored and pull[bot] committed Apr 15, 2024
1 parent a80b0c7 commit 1282712
Show file tree
Hide file tree
Showing 47 changed files with 0 additions and 224 deletions.
3 changes: 0 additions & 3 deletions src/ble/BLEEndPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
#include <stdint.h>
#include <string.h>

Expand Down
3 changes: 0 additions & 3 deletions src/ble/BleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@

#pragma once

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
#include <stdint.h>

#include <ble/BleConfig.h>
Expand Down
4 changes: 0 additions & 4 deletions src/ble/BtpEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

#pragma once

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <stdint.h>
#include <string.h>

Expand Down
8 changes: 0 additions & 8 deletions src/ble/tests/TestBleErrorStr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
*
*/

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <inttypes.h>
#include <stdint.h>
#include <string.h>
Expand Down
7 changes: 0 additions & 7 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

// module header, comes first
#include <controller/CHIPDeviceController.h>

Expand Down
4 changes: 0 additions & 4 deletions src/credentials/CHIPCert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <stddef.h>

#include <credentials/CHIPCert_Internal.h>
Expand Down
4 changes: 0 additions & 4 deletions src/credentials/CHIPCertFromX509.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <stddef.h>

#include <credentials/CHIPCert.h>
Expand Down
4 changes: 0 additions & 4 deletions src/credentials/CHIPCertToX509.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <inttypes.h>
#include <stddef.h>

Expand Down
4 changes: 0 additions & 4 deletions src/credentials/GenerateChipX509Cert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <algorithm>
#include <initializer_list>
#include <inttypes.h>
Expand Down
3 changes: 0 additions & 3 deletions src/inet/IPAddress-StringFuncts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
#include <limits>
#include <stdint.h>
#include <stdio.h>
Expand Down
4 changes: 0 additions & 4 deletions src/inet/IPAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <inet/IPAddress.h>

#include <inet/InetError.h>
Expand Down
4 changes: 0 additions & 4 deletions src/inet/InetInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <inet/InetInterface.h>

#include <inet/IPPrefix.h>
Expand Down
4 changes: 0 additions & 4 deletions src/inet/tests/TestInetCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@

#pragma once

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <ctype.h>
#include <time.h>

Expand Down
7 changes: 0 additions & 7 deletions src/inet/tests/TestInetCommonOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include "TestInetCommonOptions.h"

#include <assert.h>
Expand Down
7 changes: 0 additions & 7 deletions src/inet/tests/TestInetCommonPosix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include "TestInetCommon.h"
#include "TestInetCommonOptions.h"

Expand Down
4 changes: 0 additions & 4 deletions src/inet/tests/TestInetEndPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <errno.h>
#include <inttypes.h>
#include <stdint.h>
Expand Down
8 changes: 0 additions & 8 deletions src/inet/tests/TestInetErrorStr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
*
*/

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <inttypes.h>
#include <stdint.h>
#include <string.h>
Expand Down
4 changes: 0 additions & 4 deletions src/inet/tests/TestInetLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <signal.h>
#include <stdint.h>
#include <string.h>
Expand Down
3 changes: 0 additions & 3 deletions src/lib/asn1/ASN1Writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
#include <ctype.h>
#include <stdint.h>
#include <stdio.h>
Expand Down
4 changes: 0 additions & 4 deletions src/lib/core/ErrorStr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
*/
#include <lib/core/ErrorStr.h>

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <lib/core/CHIPConfig.h>
#include <lib/core/CHIPError.h>
#include <lib/support/DLLUtil.h>
Expand Down
4 changes: 0 additions & 4 deletions src/lib/core/TLVCircularBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
*/
#include <lib/core/TLVCircularBuffer.h>

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <lib/core/CHIPError.h>
#include <lib/core/TLVReader.h>
#include <lib/core/TLVTags.h>
Expand Down
4 changes: 0 additions & 4 deletions src/lib/core/TLVDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
*/
#include <lib/core/TLVDebug.h>

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>

#include <lib/core/CHIPError.h>
Expand Down
4 changes: 0 additions & 4 deletions src/lib/core/TLVWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
*/
#include <lib/core/TLVWriter.h>

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
Expand Down
8 changes: 0 additions & 8 deletions src/lib/core/tests/TestCHIPErrorStr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
*
*/

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <inttypes.h>
#include <stdint.h>
#include <string.h>
Expand Down
3 changes: 0 additions & 3 deletions src/lib/support/Base64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
#include "Base64.h"

#include <ctype.h>
Expand Down
7 changes: 0 additions & 7 deletions src/lib/support/CHIPArgParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include "CHIPArgParser.hpp"

#if CHIP_CONFIG_ENABLE_ARG_PARSER
Expand Down
3 changes: 0 additions & 3 deletions src/lib/support/TimeUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
*
*/

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
#include <limits>
#include <stdint.h>
#include <type_traits>
Expand Down
4 changes: 0 additions & 4 deletions src/lib/support/tests/TestPersistedCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
*
*/

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <map>
#include <string>

Expand Down
4 changes: 0 additions & 4 deletions src/lwip/standalone/arch/cc.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
#ifndef __ARCH_CC_H__
#define __ARCH_CC_H__

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

/* Include some files for defining library routines */
#include <inttypes.h>
#include <limits.h>
Expand Down
7 changes: 0 additions & 7 deletions src/messaging/ExchangeContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@
* This file implements the ExchangeContext class.
*
*/
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <inttypes.h>
#include <stdint.h>
Expand Down
8 changes: 0 additions & 8 deletions src/messaging/ExchangeMessageDispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@
* This file provides implementation of ExchangeMessageDispatch class.
*/

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <errno.h>
#include <inttypes.h>
#include <memory>
Expand Down
8 changes: 0 additions & 8 deletions src/messaging/ExchangeMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@
*
*/

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

#include <cstring>
#include <inttypes.h>
#include <stddef.h>
Expand Down
4 changes: 0 additions & 4 deletions src/system/SystemPacketBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
* mechanisms for manipulating packets of octet-serialized
* data.
*/
// Include standard C library limit macros
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif

// Include module header
#include <system/SystemPacketBuffer.h>
Expand Down
Loading

0 comments on commit 1282712

Please sign in to comment.