$ git clone http://tcclient.ion.nu/tc_client.git
commit d1a09342652dc4a5866b91b553b2a01403cb0464
Author: Alicia <...>
Date:   Mon Jun 6 13:44:04 2016 +0200

    Use uintX_t for endianness functions instead of unsigned long*x int.

diff --git a/ChangeLog b/ChangeLog
index f5d9dec..72a4106 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
 0.39:
 Added a /closecam command to stop receiving a cam stream.
-modbot: only use youtube-dl's 'ytsearch:' for --get-id, and only if it doesn't appear to be an ID already.
+Use uintX_t for endianness functions instead of unsigned long*x int.
 bugfix: brought back announcing when a cam stream ends.
+modbot: only use youtube-dl's 'ytsearch:' for --get-id, and only if it doesn't appear to be an ID already.
 tc_client-gtk: handle only one sendmessage event at a time, and don't send empty lines.
 tc_client-gtk: added postprocessing options for cams upon right-click, starting with brightness adjustment.
 tc_client-gtk: moved encoding out of the cam thread, allowing postprocessing to be applied to the broadcasted frame.
diff --git a/endian.c b/endian.c
index 17f9a2c..6f1a336 100644
--- a/endian.c
+++ b/endian.c
@@ -16,7 +16,7 @@
 */
 #include "endian.h"
 
-unsigned long long be64(unsigned long long in)
+uint64_t be64(uint64_t in)
 {
 #if(__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__)
   return ((in&0xff)<<56) |
@@ -32,7 +32,7 @@ unsigned long long be64(unsigned long long in)
 #endif
 }
 
-unsigned long be32(unsigned long in)
+uint32_t be32(uint32_t in)
 {
 #if(__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__)
   return ((in&0xff)<<24) |
@@ -44,7 +44,7 @@ unsigned long be32(unsigned long in)
 #endif
 }
 
-unsigned long le32(unsigned long in)
+uint32_t le32(uint32_t in)
 {
 #if(__BYTE_ORDER__==__ORDER_BIG_ENDIAN__)
   return ((in&0xff)<<24) |
@@ -56,7 +56,7 @@ unsigned long le32(unsigned long in)
 #endif
 }
 
-unsigned short be16(unsigned short in)
+uint16_t be16(uint16_t in)
 {
 #if(__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__)
   return ((in&0xff)<<8) |
@@ -66,7 +66,7 @@ unsigned short be16(unsigned short in)
 #endif
 }
 
-unsigned short le16(unsigned short in)
+uint16_t le16(uint16_t in)
 {
 #if(__BYTE_ORDER__==__ORDER_BIG_ENDIAN__)
   return ((in&0xff00)<<8) |
diff --git a/endian.h b/endian.h
index 1f87c60..3deb71b 100644
--- a/endian.h
+++ b/endian.h
@@ -14,8 +14,9 @@
     You should have received a copy of the GNU Affero General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
-extern unsigned long long be64(unsigned long long in);
-extern unsigned long be32(unsigned long in);
-extern unsigned long le32(unsigned long in);
-extern unsigned short be16(unsigned short in);
-extern unsigned short le16(unsigned short in);
+#include <stdint.h>
+extern uint64_t be64(uint64_t in);
+extern uint32_t be32(uint32_t in);
+extern uint32_t le32(uint32_t in);
+extern uint16_t be16(uint16_t in);
+extern uint16_t le16(uint16_t in);