summaryrefslogtreecommitdiff
path: root/libgphoto2_port
diff options
context:
space:
mode:
authorArnaud Launay <asl@launay.org>2003-02-11 12:38:26 +0000
committerArnaud Launay <asl@launay.org>2003-02-11 12:38:26 +0000
commitadd8396d8e573ff635e081b9acad81443dd83f9d (patch)
tree07c9901eed2de3239742b751f97fe39c6c06de10 /libgphoto2_port
parentf18eb6945795bab44625102ca1eb04a2bb3b4c76 (diff)
downloadlibgphoto2-add8396d8e573ff635e081b9acad81443dd83f9d.tar.gz
make the #warning dependant on __GCC__
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6194 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port')
-rw-r--r--libgphoto2_port/libgphoto2_port/gphoto2-port-log.h8
-rw-r--r--libgphoto2_port/serial/unix.c28
2 files changed, 25 insertions, 11 deletions
diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port-log.h b/libgphoto2_port/libgphoto2_port/gphoto2-port-log.h
index 56a3c0f5a..70de47daa 100644
--- a/libgphoto2_port/libgphoto2_port/gphoto2-port-log.h
+++ b/libgphoto2_port/libgphoto2_port/gphoto2-port-log.h
@@ -76,7 +76,9 @@ void gp_log_data (const char *domain, const char *data, unsigned int size);
gp_log(level, GP_MODULE "/" __FILE__, __VA_ARGS__)
#else
-#warning Disabling GP_LOG because variadic macros are not allowed
+# ifdef __GCC__
+# warning Disabling GP_LOG because variadic macros are not allowed
+# endif
#define GP_LOG (void)
#endif
@@ -100,7 +102,9 @@ void gp_log_data (const char *domain, const char *data, unsigned int size);
gp_log(GP_LOG_DEBUG, GP_MODULE "/" __FILE__, __VA_ARGS__)
#else
-#warning Disabling GP_DEBUG because variadic macros are not allowed
+# ifdef __GCC__
+# warning Disabling GP_DEBUG because variadic macros are not allowed
+# endif
#define GP_DEBUG (void)
#endif
diff --git a/libgphoto2_port/serial/unix.c b/libgphoto2_port/serial/unix.c
index 4a176e820..0d5fd10ee 100644
--- a/libgphoto2_port/serial/unix.c
+++ b/libgphoto2_port/serial/unix.c
@@ -246,11 +246,13 @@ gp_port_serial_lock (GPPort *dev, const char *path)
#endif
#ifndef __HAVE_LOCKING
-#warning No locking library found.
-#warning You will run into problems if you use
-#warning gphoto2 with a serial (RS232) camera in
-#warning combination with Konqueror (KDE) or Nautilus (GNOME).
-#warning This will *not* concern USB cameras.
+# ifdef __GCC__
+# warning No locking library found.
+# warning You will run into problems if you use
+# warning gphoto2 with a serial (RS232) camera in
+# warning combination with Konqueror (KDE) or Nautilus (GNOME).
+# warning This will *not* concern USB cameras.
+# endif
#endif
return (GP_OK);
@@ -667,7 +669,9 @@ gp_port_serial_get_pin (GPPort *dev, GPPin pin, GPLevel *level)
}
*level = j & bit;
#else
-#warning ACCESSING PINS IS NOT IMPLEMENTED FOR NON-TERMIOS SYSTEMS!
+# ifdef __GCC__
+# warning ACCESSING PINS IS NOT IMPLEMENTED FOR NON-TERMIOS SYSTEMS!
+# endif
#endif
return (GP_OK);
@@ -699,7 +703,9 @@ gp_port_serial_set_pin (GPPort *dev, GPPin pin, GPLevel level)
return GP_ERROR_IO;
}
#else
-#warning ACCESSING PINS IS NOT IMPLEMENTED FOR NON-TERMIOS SYSTEMS!
+# ifdef __GCC__
+# warning ACCESSING PINS IS NOT IMPLEMENTED FOR NON-TERMIOS SYSTEMS!
+# endif
#endif
return GP_OK;
@@ -722,7 +728,9 @@ gp_port_serial_flush (GPPort *dev, int direction)
return (GP_ERROR_IO);
}
#else
-#warning SERIAL FLUSH NOT IMPLEMENTED FOR NON TERMIOS SYSTEMS!
+# ifdef __GCC__
+# warning SERIAL FLUSH NOT IMPLEMENTED FOR NON TERMIOS SYSTEMS!
+# endif
#endif
return (GP_OK);
@@ -934,7 +942,9 @@ gp_port_serial_send_break (GPPort *dev, int duration)
tcsendbreak (dev->pl->fd, duration / 310);
tcdrain (dev->pl->fd);
#else
-#warning SEND BREAK NOT IMPLEMENTED FOR NON TERMIOS SYSTEMS!
+# ifdef __GCC__
+# warning SEND BREAK NOT IMPLEMENTED FOR NON TERMIOS SYSTEMS!
+# endif
#endif
return GP_OK;