瀏覽代碼

COMP: Attempt to fix problems with major and minor

Andy Cedilnik 20 年之前
父節點
當前提交
75b6f523ab
共有 3 個文件被更改,包括 10 次插入2 次删除
  1. 2 0
      Utilities/cmtar/CMakeLists.txt
  2. 6 0
      Utilities/cmtar/config.h.in
  3. 2 2
      Utilities/cmtar/internal.h

+ 2 - 0
Utilities/cmtar/CMakeLists.txt

@@ -99,6 +99,8 @@ FOREACH(func
     strftime
     vsnprintf
     glob
+    major
+    minor
     )
   CHECK_SYMBOL_EXISTS_EX("${func}")
 ENDFOREACH(func)

+ 6 - 0
Utilities/cmtar/config.h.in

@@ -3,6 +3,12 @@
 /* Define if your system has a working basename */
 #cmakedefine HAVE_BASENAME @HAVE_BASENAME@
 
+/* Define if your system has a working major */
+#cmakedefine HAVE_MAJOR @HAVE_MAJOR@
+
+/* Define if your system has a working minor */
+#cmakedefine HAVE_MINOR @HAVE_MINOR@
+
 /* Define to 1 if you have the <ctype.h> header file. */
 #cmakedefine HAVE_CTYPE_H @HAVE_CTYPE_H@
 

+ 2 - 2
Utilities/cmtar/internal.h

@@ -15,9 +15,9 @@
 
 #include <libtar/libtar.h>
 
-#ifndef major
+#ifndef HAVE_MAJOR
 # define major(dev) ((int)(((dev) >> 8) & 0xff))
 #endif
-#ifndef minor
+#ifndef HAVE_MINOR
 # define minor(dev) ((int)((dev) & 0xff))
 #endif