summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2007-05-22 11:55:33 +0000
committerTim-Philipp Müller <tim@centricular.net>2007-05-22 11:55:33 +0000
commite4ab657d95bf71917f58b69fe0a42ccd7dac2dc2 (patch)
tree70b9c616c3d3a09264567074f5173e850139e9e3 /plugins
parent8eaf66d000d2511f7064585ee1aedd501edf1e17 (diff)
downloadgstreamer-e4ab657d95bf71917f58b69fe0a42ccd7dac2dc2.tar.gz
plugins/: Use #ifdef for HAVE_XYZ for consistency.
Original commit message from CVS: * plugins/elements/gstelements.c: * plugins/elements/gstfilesink.c: (gst_file_sink_do_seek), (gst_file_sink_get_current_offset): * plugins/indexers/gstindexers.c: (plugin_init): Use #ifdef for HAVE_XYZ for consistency. * tests/check/Makefile.am: * tests/check/elements/.cvsignore: * tests/check/elements/filesink.c: (setup_filesink), (cleanup_filesink), (GST_START_TEST), (filesink_suite): Add some unit tests for filesink.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/elements/gstelements.c2
-rw-r--r--plugins/elements/gstfilesink.c12
-rw-r--r--plugins/indexers/gstindexers.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/elements/gstelements.c b/plugins/elements/gstelements.c
index 3e12a89ef4..795f79df32 100644
--- a/plugins/elements/gstelements.c
+++ b/plugins/elements/gstelements.c
@@ -52,7 +52,7 @@ static struct _elements_entry _elements[] = {
{"capsfilter", GST_RANK_NONE, gst_capsfilter_get_type},
{"fakesrc", GST_RANK_NONE, gst_fake_src_get_type},
{"fakesink", GST_RANK_NONE, gst_fake_sink_get_type},
-#if HAVE_SYS_SOCKET_H
+#ifdef HAVE_SYS_SOCKET_H
{"fdsrc", GST_RANK_NONE, gst_fd_src_get_type},
{"fdsink", GST_RANK_NONE, gst_fd_sink_get_type},
#endif
diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c
index 1df6d96036..b37183fb0f 100644
--- a/plugins/elements/gstfilesink.c
+++ b/plugins/elements/gstfilesink.c
@@ -319,9 +319,9 @@ gst_file_sink_query (GstPad * pad, GstQuery * query)
}
}
-#if HAVE_FSEEKO
+#ifdef HAVE_FSEEKO
# define __GST_STDIO_SEEK_FUNCTION "fseeko"
-#elif G_OS_UNIX
+#elif defined (G_OS_UNIX)
# define __GST_STDIO_SEEK_FUNCTION "lseek"
#else
# define __GST_STDIO_SEEK_FUNCTION "fseek"
@@ -336,10 +336,10 @@ gst_file_sink_do_seek (GstFileSink * filesink, guint64 new_offset)
if (fflush (filesink->file))
goto flush_failed;
-#if HAVE_FSEEKO
+#ifdef HAVE_FSEEKO
if (fseeko (filesink->file, (off_t) new_offset, SEEK_SET) != 0)
goto seek_failed;
-#elif G_OS_UNIX
+#elif defined (G_OS_UNIX)
if (lseek (fileno (filesink->file), (off_t) new_offset,
SEEK_SET) == (off_t) - 1)
goto seek_failed;
@@ -432,9 +432,9 @@ gst_file_sink_get_current_offset (GstFileSink * filesink, guint64 * p_pos)
{
off_t ret;
-#if HAVE_FTELLO
+#ifdef HAVE_FTELLO
ret = ftello (filesink->file);
-#elif G_OS_UNIX
+#elif defined (G_OS_UNIX)
if (fflush (filesink->file)) {
GST_DEBUG_OBJECT (filesink, "Flush failed: %s", g_strerror (errno));
/* ignore and continue */
diff --git a/plugins/indexers/gstindexers.c b/plugins/indexers/gstindexers.c
index 0cfc603112..5b08998d8b 100644
--- a/plugins/indexers/gstindexers.c
+++ b/plugins/indexers/gstindexers.c
@@ -33,7 +33,7 @@ plugin_init (GstPlugin * plugin)
gboolean res = TRUE;
res &= gst_mem_index_plugin_init (plugin);
-#if HAVE_MMAP && !GST_DISABLE_LOADSAVE
+#if defined(HAVE_MMAP) && !defined(GST_DISABLE_LOADSAVE)
res &= gst_file_index_plugin_init (plugin);
#endif