- Fixes so parted compiles with gcc-4.3 (#431397)
This commit is contained in:
parent
7503ed3e54
commit
bd258fc7b1
172
parted-1.8.8-gcc-4.3.patch
Normal file
172
parted-1.8.8-gcc-4.3.patch
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
diff -up parted-1.8.8/include/parted/natmath.h.gcc43 parted-1.8.8/include/parted/natmath.h
|
||||||
|
--- parted-1.8.8/include/parted/natmath.h.gcc43 2007-07-23 07:58:31.000000000 -1000
|
||||||
|
+++ parted-1.8.8/include/parted/natmath.h 2008-02-04 12:15:26.000000000 -1000
|
||||||
|
@@ -86,10 +86,8 @@ ped_alignment_is_aligned (const PedAlign
|
||||||
|
extern const PedAlignment* ped_alignment_any;
|
||||||
|
extern const PedAlignment* ped_alignment_none;
|
||||||
|
|
||||||
|
-extern inline PedSector
|
||||||
|
-ped_div_round_up (PedSector numerator, PedSector divisor);
|
||||||
|
-
|
||||||
|
-extern inline PedSector
|
||||||
|
+extern PedSector ped_div_round_up (PedSector numerator, PedSector divisor);
|
||||||
|
+extern PedSector
|
||||||
|
ped_div_round_to_nearest (PedSector numerator, PedSector divisor);
|
||||||
|
|
||||||
|
#endif /* PED_NATMATH_H_INCLUDED */
|
||||||
|
diff -up parted-1.8.8/libparted/fs/fat/traverse.c.gcc43 parted-1.8.8/libparted/fs/fat/traverse.c
|
||||||
|
--- parted-1.8.8/libparted/fs/fat/traverse.c.gcc43 2007-07-23 07:58:31.000000000 -1000
|
||||||
|
+++ parted-1.8.8/libparted/fs/fat/traverse.c 2008-02-04 16:08:28.000000000 -1000
|
||||||
|
@@ -342,9 +342,11 @@ fat_dir_entry_has_first_cluster (FatDirE
|
||||||
|
void
|
||||||
|
fat_dir_entry_get_name (FatDirEntry*dir_entry, char *result) {
|
||||||
|
int i;
|
||||||
|
- char *src;
|
||||||
|
+ char *src;
|
||||||
|
+ uint8_t *ext;
|
||||||
|
|
||||||
|
src = dir_entry->name;
|
||||||
|
+ ext = dir_entry->extension;
|
||||||
|
|
||||||
|
for (i=0; i<8; i++) {
|
||||||
|
if (src[i] == ' ' || src[i] == 0) break;
|
||||||
|
@@ -353,9 +355,9 @@ fat_dir_entry_get_name (FatDirEntry*dir_
|
||||||
|
|
||||||
|
if (src[8] != ' ' && src[8] != 0) {
|
||||||
|
*result++ = '.';
|
||||||
|
- for (i=8; i<11; i++) {
|
||||||
|
- if (src[i] == ' ' || src[i] == 0) break;
|
||||||
|
- *result++ = src[i];
|
||||||
|
+ for (i=0; i<3; i++) {
|
||||||
|
+ if (ext[i] == ' ' || ext[i] == 0) break;
|
||||||
|
+ *result++ = ext[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
diff -up parted-1.8.8/libparted/cs/natmath.c.gcc43 parted-1.8.8/libparted/cs/natmath.c
|
||||||
|
--- parted-1.8.8/libparted/cs/natmath.c.gcc43 2007-07-23 07:58:31.000000000 -1000
|
||||||
|
+++ parted-1.8.8/libparted/cs/natmath.c 2008-02-04 12:14:58.000000000 -1000
|
||||||
|
@@ -74,16 +74,16 @@ ped_round_down_to (PedSector sector, Ped
|
||||||
|
return sector - abs_mod (sector, grain_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
-inline PedSector
|
||||||
|
+PedSector
|
||||||
|
ped_div_round_up (PedSector numerator, PedSector divisor)
|
||||||
|
{
|
||||||
|
return (numerator + divisor - 1) / divisor;
|
||||||
|
}
|
||||||
|
|
||||||
|
-inline PedSector
|
||||||
|
+PedSector
|
||||||
|
ped_div_round_to_nearest (PedSector numerator, PedSector divisor)
|
||||||
|
{
|
||||||
|
- return (numerator + divisor/2) / divisor;
|
||||||
|
+ return (numerator + divisor / 2) / divisor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Rounds a number up to the closest number that is a multiple of
|
||||||
|
diff -up parted-1.8.8/parted/ui.c.gcc43 parted-1.8.8/parted/ui.c
|
||||||
|
--- parted-1.8.8/parted/ui.c.gcc43 2007-07-23 07:58:31.000000000 -1000
|
||||||
|
+++ parted-1.8.8/parted/ui.c 2008-02-05 12:20:13.000000000 -1000
|
||||||
|
@@ -297,15 +297,17 @@ _dump_history (void)
|
||||||
|
|
||||||
|
#endif /* HAVE_LIBREADLINE */
|
||||||
|
|
||||||
|
+#ifndef SA_SIGINFO
|
||||||
|
static void
|
||||||
|
mask_signal()
|
||||||
|
{
|
||||||
|
sigset_t curr;
|
||||||
|
sigset_t prev;
|
||||||
|
-
|
||||||
|
+
|
||||||
|
sigfillset(&curr);
|
||||||
|
sigprocmask(SIG_SETMASK, &curr, &prev);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Resets the environment by jumping to the initial state
|
||||||
|
* saved during ui intitialisation.
|
||||||
|
@@ -318,7 +320,7 @@ reset_env (int quit)
|
||||||
|
int in_readline = readline_state.in_readline;
|
||||||
|
|
||||||
|
readline_state.in_readline = 0;
|
||||||
|
-
|
||||||
|
+
|
||||||
|
if (in_readline) {
|
||||||
|
putchar ('\n');
|
||||||
|
if (quit)
|
||||||
|
@@ -339,6 +341,7 @@ sa_sigint_handler (int signum, siginfo_t
|
||||||
|
reset_env (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifndef SA_SIGINFO
|
||||||
|
/* Signal handler for SIGINT using 'signal'. */
|
||||||
|
static void
|
||||||
|
s_sigint_handler (int signum)
|
||||||
|
@@ -347,6 +350,7 @@ s_sigint_handler (int signum)
|
||||||
|
mask_signal ();
|
||||||
|
sa_sigint_handler (signum, NULL, NULL);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Signal handler for SIGSEGV using 'sigaction'. */
|
||||||
|
static void
|
||||||
|
@@ -383,6 +387,7 @@ sa_sigsegv_handler (int signum, siginfo_
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifndef SA_SIGINFO
|
||||||
|
/* Signal handler for SIGSEGV using 'signal'. */
|
||||||
|
static void
|
||||||
|
s_sigsegv_handler (int signum)
|
||||||
|
@@ -391,6 +396,7 @@ s_sigsegv_handler (int signum)
|
||||||
|
mask_signal ();
|
||||||
|
sa_sigsegv_handler (signum, NULL, NULL);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Signal handler for SIGFPE using 'sigaction'. */
|
||||||
|
static void
|
||||||
|
@@ -456,6 +462,7 @@ sa_sigfpe_handler (int signum, siginfo_t
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifndef SA_SIGINFO
|
||||||
|
/* Signal handler for SIGFPE using 'signal'. */
|
||||||
|
static void
|
||||||
|
s_sigfpe_handler (int signum)
|
||||||
|
@@ -464,6 +471,7 @@ s_sigfpe_handler (int signum)
|
||||||
|
mask_signal ();
|
||||||
|
sa_sigfpe_handler (signum, NULL, NULL);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Signal handler for SIGILL using 'sigaction'. */
|
||||||
|
static void
|
||||||
|
@@ -528,6 +536,7 @@ sa_sigill_handler (int signum, siginfo_t
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifndef SA_SIGINFO
|
||||||
|
/* Signal handler for SIGILL using 'signal'. */
|
||||||
|
static void
|
||||||
|
s_sigill_handler (int signum)
|
||||||
|
@@ -536,6 +545,7 @@ s_sigill_handler (int signum)
|
||||||
|
mask_signal ();
|
||||||
|
sa_sigill_handler (signum, NULL, NULL);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
static char*
|
||||||
|
_readline (const char* prompt, const StrList* possibilities)
|
||||||
|
@@ -1402,7 +1412,7 @@ init_ui ()
|
||||||
|
sig_int.sa_mask =
|
||||||
|
sig_fpe.sa_mask =
|
||||||
|
sig_ill.sa_mask = curr;
|
||||||
|
-
|
||||||
|
+
|
||||||
|
sig_segv.sa_flags =
|
||||||
|
sig_int.sa_flags =
|
||||||
|
sig_fpe.sa_flags =
|
@ -4,7 +4,7 @@
|
|||||||
Summary: The GNU disk partition manipulation program
|
Summary: The GNU disk partition manipulation program
|
||||||
Name: parted
|
Name: parted
|
||||||
Version: 1.8.8
|
Version: 1.8.8
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
URL: http://www.gnu.org/software/parted
|
URL: http://www.gnu.org/software/parted
|
||||||
@ -14,6 +14,7 @@ Patch0: %{name}-1.8.8-xvd.patch
|
|||||||
Patch1: %{name}-1.8.8-devmapper-header.patch
|
Patch1: %{name}-1.8.8-devmapper-header.patch
|
||||||
Patch2: %{name}-1.8.8-noinst-headers.patch
|
Patch2: %{name}-1.8.8-noinst-headers.patch
|
||||||
Patch3: %{name}-1.8.8-manpage.patch
|
Patch3: %{name}-1.8.8-manpage.patch
|
||||||
|
Patch4: %{name}-1.8.8-gcc-4.3.patch
|
||||||
|
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: e2fsprogs-devel
|
BuildRequires: e2fsprogs-devel
|
||||||
@ -54,6 +55,7 @@ Parted library, you need to install this package.
|
|||||||
%patch1 -p1 -b .devmapper
|
%patch1 -p1 -b .devmapper
|
||||||
%patch2 -p1 -b .noinst
|
%patch2 -p1 -b .noinst
|
||||||
%patch3 -p1 -b .manpage
|
%patch3 -p1 -b .manpage
|
||||||
|
%patch4 -p1 -b .gcc43
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --enable-device-mapper --enable-selinux --disable-static
|
%configure --enable-device-mapper --enable-selinux --disable-static
|
||||||
@ -111,6 +113,9 @@ fi
|
|||||||
%{_exec_prefix}/%{_lib}/pkgconfig/libparted.pc
|
%{_exec_prefix}/%{_lib}/pkgconfig/libparted.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 04 2008 David Cantrell <dcantrell@redhat.com> - 1.8.8-3
|
||||||
|
- Fixes so parted compiles with gcc-4.3 (#431397)
|
||||||
|
|
||||||
* Sun Jan 13 2008 David Cantrell <dcantrell@redhat.com> - 1.8.8-2
|
* Sun Jan 13 2008 David Cantrell <dcantrell@redhat.com> - 1.8.8-2
|
||||||
- Move libparted libraries to /lib (#428420)
|
- Move libparted libraries to /lib (#428420)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user