xar.patch 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. Index: include/xar.h.in
  2. --- include/xar.h.in.orig 2007-12-29 19:49:57 +0100
  3. +++ include/xar.h.in 2008-01-05 10:12:25 +0100
  4. @@ -138,7 +138,7 @@
  5. int32_t xar_prop_create(xar_file_t f, const char *key, const char *value);
  6. int32_t xar_prop_get(xar_file_t f, const char *key, const char **value);
  7. -xar_iter_t xar_iter_new();
  8. +xar_iter_t xar_iter_new(void);
  9. void xar_iter_free(xar_iter_t i);
  10. const char *xar_prop_first(xar_file_t f, xar_iter_t i);
  11. Index: lib/Makefile.inc.in
  12. --- lib/Makefile.inc.in.orig 2007-12-29 19:49:57 +0100
  13. +++ lib/Makefile.inc.in 2008-01-05 10:12:25 +0100
  14. @@ -24,32 +24,14 @@
  15. # Libraries. librxar is created such that it's possible to run xar without
  16. # first installing libxar.
  17. +LIBRXAR_SNAME := librxar.a
  18. +LIBRXAR_LNAME := librxar.a.1
  19. LIBXAR_LANAME := libxar.la
  20. LIBXAR_ANAME := libxar.a
  21. -ifeq (elf, @abi@)
  22. -LIBRXAR_SNAME := librxar.so.@LIB_REV@
  23. -LIBRXAR_LNAME := librxar.so
  24. +LIBXAR_SNAME := libxar.a
  25. +LIBXAR_LNAME := libxar.a.1
  26. LIBRXAR_L := @objroot@lib/$(LIBRXAR_LNAME)
  27. -LIBXAR_SNAME := libxar.so.@LIB_REV@
  28. -LIBXAR_LNAME := libxar.so
  29. LIBXAR_L := @objroot@lib/$(LIBXAR_LNAME)
  30. -endif
  31. -ifeq (macho, @abi@)
  32. -LIBRXAR_SNAME := librxar.@LIB_REV@.dylib
  33. -LIBRXAR_LNAME := librxar.dylib
  34. -LIBRXAR_L := @objroot@lib/$(LIBRXAR_LNAME)
  35. -LIBXAR_SNAME := libxar.@LIB_REV@.dylib
  36. -LIBXAR_LNAME := libxar.dylib
  37. -LIBXAR_L := @objroot@lib/$(LIBXAR_LNAME)
  38. -endif
  39. -ifeq (aout, @abi@)
  40. -LIBRXAR_SNAME := librxar.so.@LIB_REV@.0
  41. -LIBRXAR_LNAME :=
  42. -LIBRXAR_L :=
  43. -LIBXAR_SNAME := libxar.so.@LIB_REV@.0
  44. -LIBXAR_LNAME :=
  45. -LIBXAR_L :=
  46. -endif
  47. LIBXAR_LA := @objroot@lib/$(LIBXAR_LANAME)
  48. LIBXAR_A := @objroot@lib/$(LIBXAR_ANAME)
  49. LIBRXAR_S := @objroot@lib/$(LIBRXAR_SNAME)
  50. @@ -133,15 +115,7 @@
  51. # installing libxar.
  52. $(LIBRXAR_S) : $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
  53. @mkdir -p $(@D)
  54. -ifeq (elf, @abi@)
  55. - $(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ @LIBS@
  56. -endif
  57. -ifeq (macho, @abi@)
  58. - $(CC) -dynamiclib -compatibility_version @LIB_REV@ -current_version @LIB_REV@ -install_name @abs_objroot@$(LIBRXAR_S) -o $@ $+ $(LDFLAGS) @LIBS@
  59. -endif
  60. -ifeq (aout, @abi@)
  61. - $(CC) -shared -o $@ $+
  62. -endif
  63. + ar cvr $@ $+
  64. ifneq ($(words "" $(LIBRXAR_L)), 1)
  65. rm -f $(LIBRXAR_L)
  66. ln -s $(LIBRXAR_SNAME) $(LIBRXAR_L)
  67. @@ -149,15 +123,7 @@
  68. $(LIBXAR_S) : $(LIBXAR_SRCS:@srcroot@%.c=@objroot@%.o)
  69. @mkdir -p $(@D)
  70. -ifeq (elf, @abi@)
  71. - $(CC) -shared -Wl,-soname,$(LIBXAR_SNAME) -o $@ $+ @LIBS@
  72. -endif
  73. -ifeq (macho, @abi@)
  74. - $(CC) -dynamiclib -compatibility_version @LIB_REV@ -current_version @LIB_REV@ -install_name $(LIBDIR)/$(LIBXAR_SNAME) -o $@ $+ $(LDFLAGS) @LIBS@
  75. -endif
  76. -ifeq (aout, @abi@)
  77. - $(CC) -shared -o $@ $+
  78. -endif
  79. + ar cvr $@ $+
  80. ifneq ($(words "" $(LIBXAR_L)), 1)
  81. rm -f $(LIBXAR_L)
  82. ln -s $(LIBXAR_SNAME) $(LIBXAR_L)
  83. Index: lib/filetree.c
  84. --- lib/filetree.c.orig 2007-12-29 19:49:57 +0100
  85. +++ lib/filetree.c 2008-01-05 10:12:25 +0100
  86. @@ -263,7 +263,7 @@
  87. * Returns a newly allocated iterator for use on files, properties, or
  88. * attributes.
  89. */
  90. -xar_iter_t xar_iter_new() {
  91. +xar_iter_t xar_iter_new(void) {
  92. xar_iter_t ret = malloc(sizeof(struct __xar_iter_t));
  93. if(!ret) return NULL;
  94. Index: lib/stat.c
  95. --- lib/stat.c.orig 2007-12-29 19:49:57 +0100
  96. +++ lib/stat.c 2008-01-05 10:12:25 +0100
  97. @@ -724,7 +724,7 @@
  98. if( errno == ENOENT ) {
  99. xar_iter_t i;
  100. const char *ptr;
  101. - i = xar_iter_new(x);
  102. + i = xar_iter_new();
  103. for(ptr = xar_prop_first(tmpf, i); ptr; ptr = xar_prop_next(i)) {
  104. xar_iter_t a;
  105. const char *val = NULL;
  106. @@ -736,7 +736,7 @@
  107. continue;
  108. xar_prop_set(f, ptr, val);
  109. - a = xar_iter_new(x);
  110. + a = xar_iter_new();
  111. for(akey = xar_attr_first(tmpf, ptr, a); akey; akey = xar_attr_next(a)) {
  112. aval = xar_attr_get(tmpf, ptr, akey);
  113. xar_attr_set(f, ptr, akey, aval);