[Pcsclite-cvs-commit] PCSC/src hotplug_generic.c,1.4,1.5 hotplug_libusb.c,1.10,1.11 hotplug_linux.c,1.15,1.16 hotplug_macosx.c,1.9,1.10 powermgt_generic.c,1.1,1.2

aet-guest@quantz.debian.org aet-guest@quantz.debian.org
Mon, 08 Sep 2003 13:23:59 +0200


Update of /cvsroot/pcsclite/PCSC/src
In directory quantz:/tmp/cvs-serv12399

Modified Files:
	hotplug_generic.c hotplug_libusb.c hotplug_linux.c 
	hotplug_macosx.c powermgt_generic.c 
Log Message:
Add necessary ifdef's


Index: hotplug_generic.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_generic.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- hotplug_generic.c	7 Sep 2003 18:06:58 -0000	1.4
+++ hotplug_generic.c	8 Sep 2003 11:23:57 -0000	1.5
@@ -16,6 +16,15 @@
 #include "wintypes.h"
 #include "pcsclite.h"
 
+/*
+ * Check for platforms that have their own specific support.
+ * It's more easy and flexible to do it here, rather than
+ * with automake conditionals in src/Makefile.am.
+ * No, it's still not a perfect solution design wise.
+ */
+
+#if !defined(__APPLE__) && !defined(HAVE_LIBUSB) && !defined(__linux__)
+
 LONG HPSearchHotPluggables(void)
 {
 	return 0;
@@ -26,3 +35,4 @@
 	return 0;
 }
 
+#endif

Index: hotplug_libusb.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_libusb.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- hotplug_libusb.c	8 Sep 2003 08:50:50 -0000	1.10
+++ hotplug_libusb.c	8 Sep 2003 11:23:57 -0000	1.11
@@ -16,6 +16,7 @@
 ********************************************************************/
 
 #include "config.h"
+#ifdef HAVE_LIBUSB
 #include <string.h>
 #include <sys/types.h>
 #include <stdio.h>
@@ -395,3 +396,4 @@
 	return 0;
 }
 
+#endif

Index: hotplug_linux.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_linux.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- hotplug_linux.c	8 Sep 2003 08:50:50 -0000	1.15
+++ hotplug_linux.c	8 Sep 2003 11:23:57 -0000	1.16
@@ -16,6 +16,7 @@
 ********************************************************************/
 
 #include "config.h"
+#if defined(__linux__) && !defined(HAVE_LIBUSB)
 #include <string.h>
 #include <sys/types.h>
 #include <stdio.h>
@@ -400,3 +401,4 @@
 	return 0;
 }
 
+#endif	/* __linux__ && !HAVE_LIBUSB */

Index: hotplug_macosx.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_macosx.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- hotplug_macosx.c	7 Sep 2003 18:06:58 -0000	1.9
+++ hotplug_macosx.c	8 Sep 2003 11:23:57 -0000	1.10
@@ -14,6 +14,7 @@
 ********************************************************************/
 
 #include "config.h"
+#ifdef __APPLE__
 #include <CoreFoundation/CoreFoundation.h>
 #include <IOKit/IOCFPlugIn.h>
 #include <IOKit/IOKitLib.h>
@@ -794,3 +795,4 @@
 	return 0;
 }
 
+#endif	/* __APPLE__ */

Index: powermgt_generic.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/powermgt_generic.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- powermgt_generic.c	7 Sep 2003 20:28:53 -0000	1.1
+++ powermgt_generic.c	8 Sep 2003 11:23:57 -0000	1.2
@@ -14,7 +14,18 @@
 #include "wintypes.h"
 #include "pcsclite.h"
 
+/*
+ * Check for platforms that have their own specific support.
+ * It's more easy and flexible to do it here, rather than
+ * with automake conditionals in src/Makefile.am.
+ * No, it's still not a perfect solution design wise.
+ */
+
+#if !defined(__APPLE__)
+
 ULONG PMRegisterForPowerEvents()
 {
   return 0;
 }
+
+#endif