From 70b4150f3d96eb3bc2acc9cbb51310116fc5b911 Mon Sep 17 00:00:00 2001
From: chrfranke <chrfranke@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Mon, 19 Apr 2010 19:35:00 +0000
Subject: [PATCH] Move 'posix/getopt*' to 'getopt/getopt*'.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@3083 4ea69e1a-61f1-4043-bf83-b5c94c648137
---
 smartmontools/CHANGELOG                    |  3 +++
 smartmontools/{posix => getopt}/getopt.c   |  0
 smartmontools/{posix => getopt}/getopt.h   |  0
 smartmontools/{posix => getopt}/getopt1.c  |  0
 smartmontools/os_win32/smartctl_vc8.vcproj | 28 ++++++++++++----------
 smartmontools/os_win32/smartd_vc8.vcproj   | 28 ++++++++++++----------
 6 files changed, 35 insertions(+), 24 deletions(-)
 rename smartmontools/{posix => getopt}/getopt.c (100%)
 rename smartmontools/{posix => getopt}/getopt.h (100%)
 rename smartmontools/{posix => getopt}/getopt1.c (100%)

diff --git a/smartmontools/CHANGELOG b/smartmontools/CHANGELOG
index d99985df9..9e058df10 100644
--- a/smartmontools/CHANGELOG
+++ b/smartmontools/CHANGELOG
@@ -43,6 +43,9 @@ NOTES FOR FUTURE RELEASES: see TODO file.
 
 <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
 
+  [CF] Move 'posix/getopt*' to 'getopt/getopt*'.  Can be used for
+       platforms with regex() but without getopt_long() (QNX, ticket #1).
+
   [CF] smartd '-l selftest' directive: Print info if error count
        decreased.  Avoid misleading warning if error count decreased
        to zero (ticket #67).
diff --git a/smartmontools/posix/getopt.c b/smartmontools/getopt/getopt.c
similarity index 100%
rename from smartmontools/posix/getopt.c
rename to smartmontools/getopt/getopt.c
diff --git a/smartmontools/posix/getopt.h b/smartmontools/getopt/getopt.h
similarity index 100%
rename from smartmontools/posix/getopt.h
rename to smartmontools/getopt/getopt.h
diff --git a/smartmontools/posix/getopt1.c b/smartmontools/getopt/getopt1.c
similarity index 100%
rename from smartmontools/posix/getopt1.c
rename to smartmontools/getopt/getopt1.c
diff --git a/smartmontools/os_win32/smartctl_vc8.vcproj b/smartmontools/os_win32/smartctl_vc8.vcproj
index 980ff787f..ea44ab7f0 100644
--- a/smartmontools/os_win32/smartctl_vc8.vcproj
+++ b/smartmontools/os_win32/smartctl_vc8.vcproj
@@ -304,18 +304,6 @@
 		<Filter
 			Name="posix"
 			>
-			<File
-				RelativePath="..\posix\getopt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\posix\getopt.h"
-				>
-			</File>
-			<File
-				RelativePath="..\posix\getopt1.c"
-				>
-			</File>
 			<File
 				RelativePath="..\posix\regcomp.c"
 				>
@@ -389,6 +377,22 @@
 				</FileConfiguration>
 			</File>
 		</Filter>
+		<Filter
+			Name="getopt"
+			>
+			<File
+				RelativePath="..\getopt\getopt.c"
+				>
+			</File>
+			<File
+				RelativePath="..\getopt\getopt.h"
+				>
+			</File>
+			<File
+				RelativePath="..\getopt\getopt1.c"
+				>
+			</File>
+		</Filter>
 		<File
 			RelativePath="..\atacmdnames.cpp"
 			>
diff --git a/smartmontools/os_win32/smartd_vc8.vcproj b/smartmontools/os_win32/smartd_vc8.vcproj
index 807d4a2f0..c98b5f044 100644
--- a/smartmontools/os_win32/smartd_vc8.vcproj
+++ b/smartmontools/os_win32/smartd_vc8.vcproj
@@ -208,18 +208,6 @@
 		<Filter
 			Name="posix"
 			>
-			<File
-				RelativePath="..\posix\getopt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\posix\getopt.h"
-				>
-			</File>
-			<File
-				RelativePath="..\posix\getopt1.c"
-				>
-			</File>
 			<File
 				RelativePath="..\posix\regcomp.c"
 				>
@@ -293,6 +281,22 @@
 				</FileConfiguration>
 			</File>
 		</Filter>
+		<Filter
+			Name="getopt"
+			>
+			<File
+				RelativePath="..\getopt\getopt.c"
+				>
+			</File>
+			<File
+				RelativePath="..\getopt\getopt.h"
+				>
+			</File>
+			<File
+				RelativePath="..\getopt\getopt1.c"
+				>
+			</File>
+		</Filter>
 		<File
 			RelativePath="..\atacmdnames.cpp"
 			>
-- 
GitLab