chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sources, by analogy with sinks
[disorder]
/
lib
/
common.h
diff --git
a/lib/common.h
b/lib/common.h
index 2ca41a69b88852f3572200e0ccea36a2acd20495..9cf38921a86a4060a5804faa21e97ac7c895144d 100644
(file)
--- a/
lib/common.h
+++ b/
lib/common.h
@@
-1,6
+1,6
@@
/*
* This file is part of DisOrder.
/*
* This file is part of DisOrder.
- * Copyright (C) 2004, 2005, 2007, 2008 Richard Kettlewell
+ * Copyright (C) 2004, 2005, 2007, 2008
, 2013
Richard Kettlewell
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-22,8
+22,15
@@
#ifndef COMMON_H
#define COMMON_H
#ifndef COMMON_H
#define COMMON_H
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+# define SOCKET int
+# define INVALID_SOCKET (-1)
+# define declspec(x)
+# define socket_error() (errno)
+# define system_error() (errno)
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
@@
-110,6
+117,10
@@
typedef unsigned char uint32_t;
# endif
#endif
# endif
#endif
+#if !HAVE_CLOSESOCKET
+# define closesocket close
+#endif
+
#endif /* COMMENT_H */
/*
#endif /* COMMENT_H */
/*