]> granicus.if.org Git - check/commitdiff
* add pipe(2) stub
authorcpickett <cpickett@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Tue, 30 Dec 2008 06:21:44 +0000 (06:21 +0000)
committercpickett <cpickett@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Tue, 30 Dec 2008 06:21:44 +0000 (06:21 +0000)
  - now both src/ and tests/ compile and link properly on MSYS/MinGW!

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@490 64e312b2-a51f-0410-8e61-82d0ca0eb02a

configure.ac
lib/libcompat.h
lib/pipe.c [new file with mode: 0644]

index de46d9d44177c9acc4f2c69337ab93096d55eba7..1c1864159fa861d31203c6688e98480c8210a1b9 100644 (file)
@@ -117,8 +117,8 @@ AC_CHECK_SIZEOF(long, 4)
 # Checks for library functions.
 AC_FUNC_MALLOC
 AC_FUNC_REALLOC
-AC_REPLACE_FUNCS([fileno localtime_r putenv setenv sleep strdup strsignal unsetenv])
-AC_CHECK_DECLS([fileno, localtime_r, putenv, setenv, sleep, strdup, strsignal, unsetenv])
+AC_REPLACE_FUNCS([fileno localtime_r pipe putenv setenv sleep strdup strsignal unsetenv])
+AC_CHECK_DECLS([fileno, localtime_r, pipe, putenv, setenv, sleep, strdup, strsignal, unsetenv])
 
 # Output files
 AC_CONFIG_HEADERS([config.h])
index a8b8b2d64ba12c2775cfb50664d169ed24d6e347..f9d8ecd9529cf3e844b1b91b770c8241b967c44b 100644 (file)
@@ -43,8 +43,12 @@ int fileno (FILE *stream);
 struct tm *localtime_r (const time_t *clock, struct tm *result);
 #endif /* !HAVE_DECL_LOCALTIME_R */
 
+#if !HAVE_DECL_PIPE
+int pipe (int *fildes);
+#endif /* !HAVE_DECL_PIPE */
+
 #if !HAVE_DECL_PUTENV
-int putenv (const char *string CK_ATTRIBUTE_UNUSED);
+int putenv (const char *string);
 #endif /* !HAVE_DECL_PUTENV */
 
 #if !HAVE_DECL_SETENV
diff --git a/lib/pipe.c b/lib/pipe.c
new file mode 100644 (file)
index 0000000..3859a51
--- /dev/null
@@ -0,0 +1,7 @@
+#include "libcompat.h"
+
+int
+pipe (int *fildes CK_ATTRIBUTE_UNUSED)
+{
+  return 0;
+}