named-data-iot / ndn-lite

A lightweight NDN protocol stack with high-level application support including security bootstrapping, access control, trust management, etc.
https://ndn-lite.named-data.net
GNU Lesser General Public License v3.0
44 stars 16 forks source link

_t suffix is reserved by POSIX standard #66

Open yoursunny opened 5 years ago

yoursunny commented 5 years ago

According to libtool documentation and POSIX.1 standard section 2.2.2, some classes of identifier names are reserved for future extensions to the C language or the POSIX.1 environment. While using these names for your own purposes right now might not cause a problem, they do raise the possibility of conflict with future versions of the C or POSIX standards, so you should avoid these names.

One of them is names that end with _t suffix, reserved by POSIX.1 standard for additional type names. ndn-lite contains declarations like: https://github.com/named-data-iot/ndn-lite/blob/361ac338b885fb3c68ce6d1c709cd401885cb276/encode/interest.h#L26-L29 They should be changed to:

typedef struct interest_params {
  uint8_t value[NDN_INTEREST_PARAMS_BUFFER_SIZE];
  uint32_t size;
} interest_params;