Commit Diff


commit - 8f01fac29bbd2a3afdab7297a4145192692400a5
commit + 60c891c2ceb82f9e49bd4b60c355de3f91cbf494
blob - 8371a0e037984882553fd699538e3d7429606f40
blob + e028646abca1accf7101c1fbf4a72d7dccda8043
--- Makefile.am
+++ Makefile.am
@@ -15,4 +15,6 @@ telescope_SOURCES =	compat.h	\
 			url.h		\
 			util.c
 
+LDADD = $(LIBOBJS)
+
 dist_doc_DATA =		README.md
blob - 4f0c967cb6f3ba457684ea17f367f4da6ef3d805
blob + 1d75ae2114b24059d3b4f0fe18e8d925db430b5d
--- compat/getdtablecount.c
+++ compat/getdtablecount.c
@@ -17,7 +17,7 @@
 /* XXX: on linux it's possible to glob("/proc/$pid/fd/ *") to know the
  * dtablecount. */
 
-#include "../config.h"
+#include "compat.h"
 
 int
 getdtablecount(void)
blob - 9376218217974e1104b65fa055645d8a5d39d11a
blob + a9a8e9d52cba2c1315734677e41e7c83d6399f4b
--- compat/getdtablesize.c
+++ compat/getdtablesize.c
@@ -14,6 +14,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "compat.h"
+
 #include <unistd.h>
 
 int
blob - a243233e862d7543bb608489a36fdfd7c13be822
blob + c07be89e2148f1b0d6a045b38755ebb9a815b0ba
--- compat/getprogname.c
+++ compat/getprogname.c
@@ -14,7 +14,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include "../config.h"
+#include "compat.h"
 
 #ifdef HAVE_PROGRAM_INVOCATION_SHORT_NAME
 
blob - b5c0dca67da1fb8e341cc87bd4371be0099192f9
blob + cb9004d4e285ddfd4f072cf8b27b6ed6c2772dfc
--- compat/imsg-buffer.c
+++ compat/imsg-buffer.c
@@ -15,8 +15,6 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-
-#include "../config.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>
blob - 3d36a402db11c258417b0ffc9ccd58e45babb78f
blob + f9b7f2e0614ddccd16681666d39bd59f93365ff4
--- compat/imsg.c
+++ compat/imsg.c
@@ -15,8 +15,6 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-
-#include "../config.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>
blob - 5b092cfcfd53b5b09a2d5932010f421d6795e0aa
blob + df2ef06c1e5087adcd1639d79f108c7492ee6fc6
--- compat/imsg.h
+++ compat/imsg.h
@@ -23,6 +23,8 @@
 
 #include <stdint.h>
 
+#include "compat.h"
+
 #define IBUF_READ_SIZE		65535
 #define IMSG_HEADER_SIZE	sizeof(struct imsg_hdr)
 #define MAX_IMSGSIZE		16384
blob - 73b63c454278ff9656324d7cb2bb1c4d72dd572e
blob + 7d4af5e39ab4702cedb2224f502372c06daf2f00
--- compat.h
+++ compat.h
@@ -17,6 +17,8 @@
 #ifndef COMPAT_H
 #define COMPAT_H
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/uio.h>
 
@@ -59,6 +61,14 @@ int		 getdtablecount(void);
 int		 getdtablesize(void);
 #endif
 
+#ifndef HAVE_GETPROGNAME
+const char	*getprogname(void);
+#endif
+
+#ifndef HAVE_RECALLOCARRAY
+void		*recallocarray(void*, size_t, size_t, size_t);
+#endif
+
 #ifndef HAVE_STRLCPY
 size_t		 strlcpy(char*, const char*, size_t);
 #endif
blob - 90a40e697440410d830de89642754ed2c0449d20
blob + 6ec46410ff7d9de90ae7afbe82ceb97fbc1a6721
--- configure.ac
+++ configure.ac
@@ -1,6 +1,6 @@
 AC_INIT([telescope], [0.1], [telescope@omarpolo.com], [telescope], [gemini://telescope.omarpolo.com])
 AC_CONFIG_LIBOBJ_DIR(compat)
-AM_INIT_AUTOMAKE([-Wall foreign])
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
 AC_PROG_CC
 
 PKG_PROG_PKG_CONFIG
@@ -12,6 +12,7 @@ AC_REPLACE_FUNCS([
 	getdtablecount \
 	getdtablesize \
 	getprogname \
+	recallocarray \
 	strlcat \
 	strlcpy \
 	strtonum \
blob - f0a975bc4d3ac0d40f4a0171b99724564690bdcf
blob + 06da994b977854b39d7e43dddeef692a8e8c6d6d
--- telescope.h
+++ telescope.h
@@ -17,7 +17,6 @@
 #ifndef TELESCOPE_H
 #define TELESCOPE_H
 
-#include "config.h"
 #include "compat.h"
 
 #include "url.h"