parted/parted-1.8.8-gcc-4.3.patch
2008-02-05 22:42:44 +00:00

173 lines
5.0 KiB
Diff

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 =