diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/account.h | 2 | ||||
| -rw-r--r-- | include/bots.h | 2 | ||||
| -rw-r--r-- | include/channels.h | 8 | ||||
| -rw-r--r-- | include/extern.h | 12 | ||||
| -rw-r--r-- | include/modules.h | 2 | ||||
| -rw-r--r-- | include/regchannel.h | 20 | ||||
| -rw-r--r-- | include/services.h | 2 | ||||
| -rw-r--r-- | include/sysconf.h.cmake | 84 |
8 files changed, 32 insertions, 100 deletions
diff --git a/include/account.h b/include/account.h index 3cfb803f8..395d883dc 100644 --- a/include/account.h +++ b/include/account.h @@ -158,7 +158,7 @@ class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END Oper *o; /* Unsaved data */ - uint16 channelcount; /* Number of channels currently registered */ + uint16_t channelcount; /* Number of channels currently registered */ time_t lastmail; /* Last time this nick record got a mail */ std::list<NickAlias *> aliases; /* List of aliases */ diff --git a/include/bots.h b/include/bots.h index c23a354fc..64d185840 100644 --- a/include/bots.h +++ b/include/bots.h @@ -35,7 +35,7 @@ static const Anope::string BotFlagString[] = { "BEGIN", "CORE", "PRIVATE", "CONF class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>, public Serializable<BotInfo> { public: - uint32 chancount; + uint32_t chancount; time_t created; /* Birth date ;) */ time_t lastmsg; /* Last time we said something */ typedef Anope::insensitive_map<CommandInfo> command_map; diff --git a/include/channels.h b/include/channels.h index 81096cbe3..a4e27469c 100644 --- a/include/channels.h +++ b/include/channels.h @@ -43,7 +43,7 @@ class CoreExport Channel : public Extensible, public Flags<ChannelFlag, 3> /** A map of channel modes with their parameters set on this channel */ ModeList modes; - + public: /** Default constructor * @param name The channel name @@ -68,9 +68,9 @@ class CoreExport Channel : public Extensible, public Flags<ChannelFlag, 3> time_t server_modetime; /* Time of last server MODE */ time_t chanserv_modetime; /* Time of last check_modes() */ - int16 server_modecount; /* Number of server MODEs this second */ - int16 chanserv_modecount; /* Number of check_mode()'s this sec */ - int16 bouncy_modes; /* Did we fail to set modes here? */ + int16_t server_modecount; /* Number of server MODEs this second */ + int16_t chanserv_modecount; /* Number of check_mode()'s this sec */ + int16_t bouncy_modes; /* Did we fail to set modes here? */ /** Call if we need to unset all modes and clear all user status (internally). * Only useful if we get a SJOIN with a TS older than what we have here diff --git a/include/extern.h b/include/extern.h index 83907224f..9a1583ec6 100644 --- a/include/extern.h +++ b/include/extern.h @@ -171,8 +171,8 @@ E bool nickIsServices(const Anope::string &nick, bool bot); E void add_entropy_userkeys(); E void rand_init(); E unsigned char getrandom8(); -E uint16 getrandom16(); -E uint32 getrandom32(); +E uint16_t getrandom16(); +E uint32_t getrandom32(); E std::list<Anope::string> BuildStringList(const Anope::string &, char = ' '); E std::vector<Anope::string> BuildStringVector(const Anope::string &, char = ' '); @@ -208,14 +208,14 @@ E void notice_server(const Anope::string &source, const Server *s, const char *f /**** sockets.cpp ****/ -E int32 TotalRead; -E int32 TotalWritten; +E int32_t TotalRead; +E int32_t TotalWritten; E SocketIO normalSocketIO; /**** users.c ****/ -E int32 opcnt; -E uint32 maxusercnt, usercnt; +E int32_t opcnt; +E uint32_t maxusercnt, usercnt; E time_t maxusertime; E User *finduser(const Anope::string &nick); diff --git a/include/modules.h b/include/modules.h index 376224097..695917dbf 100644 --- a/include/modules.h +++ b/include/modules.h @@ -594,7 +594,7 @@ class CoreExport Module : public Extensible * @param priv The privilege changed * @param what The new level */ - virtual void OnLevelChange(User *u, ChannelInfo *ci, const Anope::string &priv, int16 what) { } + virtual void OnLevelChange(User *u, ChannelInfo *ci, const Anope::string &priv, int16_t what) { } /** Called when a channel is dropped * @param chname The channel name diff --git a/include/regchannel.h b/include/regchannel.h index 680be5b44..62d3eeccc 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -152,7 +152,7 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, std::vector<ChanAccess *> access; /* List of authorized users */ std::vector<AutoKick *> akick; /* List of users to kickban */ std::vector<BadWord *> badwords; /* List of badwords */ - std::map<Anope::string, int16> levels; + std::map<Anope::string, int16_t> levels; public: typedef std::multimap<ChannelModeName, ModeLock> ModeList; @@ -184,7 +184,7 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, Anope::string last_topic_setter; /* Setter */ time_t last_topic_time; /* Time */ - int16 bantype; + int16_t bantype; MemoInfo memos; @@ -193,11 +193,11 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, /* For BotServ */ BotInfo *bi; /* Bot used on this channel */ Flags<BotServFlag> botflags; - int16 ttb[TTB_SIZE]; /* Times to ban for each kicker */ + int16_t ttb[TTB_SIZE]; /* Times to ban for each kicker */ - int16 capsmin, capspercent; /* For CAPS kicker */ - int16 floodlines, floodsecs; /* For FLOOD kicker */ - int16 repeattimes; /* For REPEAT kicker */ + int16_t capsmin, capspercent; /* For CAPS kicker */ + int16_t floodlines, floodsecs; /* For FLOOD kicker */ + int16_t repeattimes; /* For REPEAT kicker */ serialized_data serialize(); static void unserialize(serialized_data &); @@ -377,7 +377,7 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, ModeLock *GetMLock(ChannelModeName mname, const Anope::string ¶m = ""); /** Get the current mode locks as a string - * @param complete True to show mlock parameters aswell + * @param complete True to show mlock parameters aswell * @return A string of mode locks, eg: +nrt */ Anope::string GetMLockAsString(bool complete) const; @@ -393,7 +393,7 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, * the new topic in the ChannelInfo */ void CheckTopic(); - + /** Restore the channel topic, used on channel creation when not syncing with the uplink * and after uplink sync */ @@ -404,13 +404,13 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, * @return the level * @throws CoreException if priv is not a valid privilege */ - int16 GetLevel(const Anope::string &priv); + int16_t GetLevel(const Anope::string &priv); /** Set the level for a privilege * @param priv The privilege priv * @param level The new level */ - void SetLevel(const Anope::string &priv, int16 level); + void SetLevel(const Anope::string &priv, int16_t level); /** Remove a privilege from the channel * @param priv The privilege diff --git a/include/services.h b/include/services.h index d34d858f1..6004532d1 100644 --- a/include/services.h +++ b/include/services.h @@ -551,7 +551,7 @@ class CoreExport Memo : public Flags<MemoFlag>, public Serializable<Memo> struct CoreExport MemoInfo { - int16 memomax; + int16_t memomax; std::vector<Memo *> memos; std::vector<Anope::string> ignores; diff --git a/include/sysconf.h.cmake b/include/sysconf.h.cmake index ff391a7b1..8470f81c4 100644 --- a/include/sysconf.h.cmake +++ b/include/sysconf.h.cmake @@ -4,7 +4,7 @@ #cmakedefine DEBUG_BUILD #cmakedefine DEFUMASK @DEFUMASK@ -#cmakedefine HAVE_SYS_TYPES_H 1 +#cmakedefine HAVE_CSTDINT 1 #cmakedefine HAVE_STDINT_H 1 #cmakedefine HAVE_STDDEF_H 1 #cmakedefine HAVE_SETGRENT 1 @@ -18,85 +18,17 @@ #cmakedefine GETTEXT_FOUND 1 #cmakedefine RUNGROUP "@RUNGROUP@" -#cmakedefine HAVE_UINT8_T 1 -#cmakedefine HAVE_U_INT8_T 1 -#cmakedefine HAVE_INT16_T 1 -#cmakedefine HAVE_UINT16_T 1 -#cmakedefine HAVE_U_INT16_T 1 -#cmakedefine HAVE_INT32_T 1 -#cmakedefine HAVE_UINT32_T 1 -#cmakedefine HAVE_U_INT32_T 1 - -#ifdef HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif -#ifdef HAVE_STDINT_H -# include <stdint.h> -#endif -#ifdef HAVE_STDDEF_H -# include <stddef.h> -#endif - -#ifdef HAVE_UINT8_T -typedef uint8_t uint8; -#else -# ifdef HAVE_U_INT8_T -typedef u_int8_t uint8; -# else -# ifdef _WIN32 -typedef unsigned __int8 uint8; -# else -typedef unsigned short uint8; -# endif -# endif -#endif - -#ifdef HAVE_INT16_T -typedef int16_t int16; -#else -# ifdef _WIN32 -typedef signed __int16 int16; -# else -typedef int int16; -# endif -#endif - -#ifdef HAVE_UINT16_T -typedef uint16_t uint16; -#else -# ifdef HAVE_U_INT16_T -typedef u_int16_t uint16; -# else -# ifdef _WIN32 -typedef unsigned __int16 uint16; -# else -typedef unsigned int uint16; -# endif -# endif -#endif - -#ifdef HAVE_INT32_T -typedef int32_t int32; +#ifdef HAVE_CSTDINT +# include <cstdint> #else -# ifdef _WIN32 -typedef signed __int32 int32; +# ifdef HAVE_STDINT_H +# include <stdint.h> # else -typedef long int32; +# include "pstdint.h" # endif #endif - -#ifdef HAVE_UINT32_T -typedef uint32_t uint32; -#else -# ifdef HAVE_U_INT32_T -typedef u_int32_t uint32; -# else -# ifdef _WIN32 -typedef unsigned __int32 uint32; -# else -typedef unsigned long uint32; -# endif -# endif +#ifdef HAVE_STDDEF_H +# include <stddef.h> #endif #ifdef _WIN32 |
