summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <gp@n-dimensional.de>2005-03-30 14:41:24 +0000
committerHans Ulrich Niedermann <gp@n-dimensional.de>2005-03-30 14:41:24 +0000
commit7a728a838ef2bc58cec0f0e45b6932ab6661d5a3 (patch)
tree5fbb29e574c9185c09bc41facfda5491d08269f9
parent67d1fd66e4315aad747010e3e99ef66f1157224e (diff)
downloadlibgphoto2-7a728a838ef2bc58cec0f0e45b6932ab6661d5a3.tar.gz
replace stricmp() by strcasecmp()
#include <gphoto2-port-portability.h> should take care of portability of strcasecmp() git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@7689 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r--ChangeLog6
-rw-r--r--libgphoto2/gphoto2-file.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 87c1b6c7d..51411ca83 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-30 Hans Ulrich Niedermann <gp@n-dimensional.de>
+
+ * libgphoto2/gphoto2-file.c: replace stricmp() by strcasecmp()
+ #include <gphoto2-port-portability.h> should take care of
+ portability of strcasecmp()
+
2005-02-07 Marcus Meissner <marcus@jet.franken.de>
* libgphoto2/gphoto2-filesys.c:
diff --git a/libgphoto2/gphoto2-file.c b/libgphoto2/gphoto2-file.c
index d66ade984..1a9e83f89 100644
--- a/libgphoto2/gphoto2-file.c
+++ b/libgphoto2/gphoto2-file.c
@@ -29,6 +29,7 @@
#include <utime.h>
#include <gphoto2-port-log.h>
+#include <gphoto2-port-portability.h>
#include "gphoto2-result.h"
@@ -265,11 +266,7 @@ gp_file_open (CameraFile *file, const char *filename)
dot = strrchr (filename, '.');
if (dot) {
for (i = 0; mime_table[i] ; i+=2)
-#ifdef HAVE_STRCASECMP
if (!strcasecmp (mime_table[i], dot+1)) {
-#else
- if (!stricmp (mime_table[i], dot+1)) {
-#endif
strncpy (file->mime_type, mime_table[i+1], sizeof(file->mime_type));
break;
}