summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--gptsync/Makefile23
-rw-r--r--gptsync/gptsync.h9
3 files changed, 25 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index ebb85e991..9d10c84aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-17 Peter Jones <pjones@redhat.com>
+
+ * gptsync/Makefile: use Makefile.inc's CFLAGS (mostly)
+
+ * gptsync/gptsync.h: fix UINT* type declarations so x86_64 works
+ right.
+
2007-10-17 Chris Lumens <clumens@redhat.com>
* kickstart.py (Bootloader.parse): Detect invalid hard drives given
diff --git a/gptsync/Makefile b/gptsync/Makefile
index 8cc91dd51..c08a7745d 100644
--- a/gptsync/Makefile
+++ b/gptsync/Makefile
@@ -3,27 +3,30 @@
#
-TARGETS = gptsync showpart
-OBJS = showpart.c lib.c os_unix.c gptsync.c
+TARGETS = gptsync showpart
+OBJS = showpart.c lib.c os_unix.c gptsync.c
-CPPFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-CFLAGS = -Wall -Werror
-LDFLAGS =
-LIBS =
-CC = gcc
+CPPFLAGS = $(CFLAGS)
+#CPPFLAGS = $(shell echo $(CFLAGS) | sed -e 's/-O2/-O0/g' -e 's/-g /-ggdb3 /g')
+CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+LDFLAGS =
+LIBS =
+CC = gcc
+
+include ../Makefile.inc
# real making
all: $(TARGETS)
gptsync: gptsync.o lib.o
- $(CC) $(LDFLAGS) -DPROGNAME=$@ -o $@ os_unix.c $^ $(LIBS)
+ $(CC) $(CPPFLAGS) $(LDFLAGS) -DPROGNAME=$@ -o $@ os_unix.c $^ $(LIBS)
showpart: showpart.o lib.o
- $(CC) $(LDFLAGS) -DPROGNAME=$@ -o $@ os_unix.c $^ $(LIBS)
+ $(CC) $(CPPFLAGS) $(LDFLAGS) -DPROGNAME=$@ -o $@ os_unix.c $^ $(LIBS)
%.o: %.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+ $(CC) $(CPPFLAGS) -c -o $@ $<
# cleanup
diff --git a/gptsync/gptsync.h b/gptsync/gptsync.h
index 8bb5da4dc..d1bf3c20e 100644
--- a/gptsync/gptsync.h
+++ b/gptsync/gptsync.h
@@ -65,6 +65,7 @@ typedef CHAR16 CHARN;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <unistd.h>
#include <errno.h>
@@ -75,10 +76,10 @@ typedef CHAR16 CHARN;
typedef int INTN;
typedef unsigned int UINTN;
-typedef unsigned char UINT8;
-typedef unsigned short UINT16;
-typedef unsigned long UINT32;
-typedef unsigned long long UINT64;
+typedef uint8_t UINT8;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
typedef void VOID;
typedef int BOOLEAN;