Conditional (enabled) compilation of Nokia Authentication phase (not needed?)
[gnokii.git] / common / misc.c
index 34d81b7..b355232 100644 (file)
@@ -8,6 +8,8 @@
 
 */
 
+#include "config.h"
+
 #include <string.h>\r
 #include <ctype.h>\r
 #include <time.h>\r
@@ -57,6 +59,8 @@ int GetLine(FILE *File, char *Line, int count) {
   } else return -1;
 }
 
+#ifndef UCLINUX
+
 /*
  * like atoi, but of a non-null-terminated string of a specified portion
  */
@@ -69,6 +73,8 @@ int mem_to_int(const char str[], int len)
   return( atoi(aux) );
 } 
 
+#endif /* UCLINUX */
+
 /*
  * make hexdump of Message
  */
@@ -156,6 +162,8 @@ void txhexdump(u16 MessageLength, u8 *MessageBuffer)
 
 #ifndef WIN32
 
+#ifndef UCLINUX
+
 #define max_buf_len 128
 #define lock_path "/var/lock/LCK.."
 
@@ -225,7 +233,7 @@ char *lock_device(const char* port)
 }
 
 /* Removes lock and frees memory */
-bool unlock_device(char *lock_file)
+static bool unlock_device(char *lock_file)
 {
        int err;
 
@@ -237,4 +245,7 @@ bool unlock_device(char *lock_file)
        free(lock_file);
        return (err + 1);
 }
+
+#endif /* UCLINUX */
+
 #endif /* WIN32 */