Adjust position of multiple-inclusion protection in .h files
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
/* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed
|
/* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed
|
||||||
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#ifndef __GPT_ATTRIBUTES
|
#ifndef __GPT_ATTRIBUTES
|
||||||
#define __GPT_ATTRIBUTES
|
#define __GPT_ATTRIBUTES
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#define NUM_ATR 64 /* # of attributes -- 64, since it's a 64-bit field */
|
#define NUM_ATR 64 /* # of attributes -- 64, since it's a 64-bit field */
|
||||||
#define ATR_NAME_SIZE 25 /* maximum size of attribute names */
|
#define ATR_NAME_SIZE 25 /* maximum size of attribute names */
|
||||||
|
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
/* This program is copyright (c) 2009-2013 by Roderick W. Smith. It is distributed
|
/* This program is copyright (c) 2009-2013 by Roderick W. Smith. It is distributed
|
||||||
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
||||||
|
|
||||||
|
#ifndef __BASICMBRSTRUCTS
|
||||||
|
#define __BASICMBRSTRUCTS
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "diskio.h"
|
#include "diskio.h"
|
||||||
#include "mbrpart.h"
|
#include "mbrpart.h"
|
||||||
|
|
||||||
#ifndef __BASICMBRSTRUCTS
|
|
||||||
#define __BASICMBRSTRUCTS
|
|
||||||
|
|
||||||
#define MBR_SIGNATURE UINT16_C(0xAA55)
|
#define MBR_SIGNATURE UINT16_C(0xAA55)
|
||||||
|
|
||||||
// Maximum number of MBR partitions
|
// Maximum number of MBR partitions
|
||||||
|
|||||||
6
bsd.h
6
bsd.h
@@ -3,14 +3,14 @@
|
|||||||
/* This program is copyright (c) 2009 by Roderick W. Smith. It is distributed
|
/* This program is copyright (c) 2009 by Roderick W. Smith. It is distributed
|
||||||
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
||||||
|
|
||||||
|
#ifndef __BSD_STRUCTS
|
||||||
|
#define __BSD_STRUCTS
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "gptpart.h"
|
#include "gptpart.h"
|
||||||
#include "diskio.h"
|
#include "diskio.h"
|
||||||
|
|
||||||
#ifndef __BSD_STRUCTS
|
|
||||||
#define __BSD_STRUCTS
|
|
||||||
|
|
||||||
#define BSD_SIGNATURE UINT32_C(0x82564557) /* BSD disklabel signature ("magic") */
|
#define BSD_SIGNATURE UINT32_C(0x82564557) /* BSD disklabel signature ("magic") */
|
||||||
|
|
||||||
// BSD disklabels can start at offsets of 64 or the sector size -- at least,
|
// BSD disklabels can start at offsets of 64 or the sector size -- at least,
|
||||||
|
|||||||
@@ -37,6 +37,10 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define off64_t off_t
|
||||||
|
#endif
|
||||||
|
|
||||||
// Returns the official "real" name for a shortened version of same.
|
// Returns the official "real" name for a shortened version of same.
|
||||||
// Trivial here; more important in Windows
|
// Trivial here; more important in Windows
|
||||||
void DiskIO::MakeRealName(void) {
|
void DiskIO::MakeRealName(void) {
|
||||||
|
|||||||
6
gpt.h
6
gpt.h
@@ -4,6 +4,9 @@
|
|||||||
/* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed
|
/* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed
|
||||||
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
||||||
|
|
||||||
|
#ifndef __GPTSTRUCTS
|
||||||
|
#define __GPTSTRUCTS
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "gptpart.h"
|
#include "gptpart.h"
|
||||||
@@ -12,9 +15,6 @@
|
|||||||
#include "bsd.h"
|
#include "bsd.h"
|
||||||
#include "gptpart.h"
|
#include "gptpart.h"
|
||||||
|
|
||||||
#ifndef __GPTSTRUCTS
|
|
||||||
#define __GPTSTRUCTS
|
|
||||||
|
|
||||||
// Default values for sector alignment
|
// Default values for sector alignment
|
||||||
#define DEFAULT_ALIGNMENT 2048
|
#define DEFAULT_ALIGNMENT 2048
|
||||||
#define MAX_ALIGNMENT 65536
|
#define MAX_ALIGNMENT 65536
|
||||||
|
|||||||
@@ -19,14 +19,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __GPT_CURSES
|
||||||
|
#define __GPT_CURSES
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "gptpart.h"
|
#include "gptpart.h"
|
||||||
#include "gpt.h"
|
#include "gpt.h"
|
||||||
|
|
||||||
#ifndef __GPT_CURSES
|
|
||||||
#define __GPT_CURSES
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
struct MenuItem {
|
struct MenuItem {
|
||||||
|
|||||||
6
mbr.h
6
mbr.h
@@ -3,6 +3,9 @@
|
|||||||
/* This program is copyright (c) 2009-2013 by Roderick W. Smith. It is distributed
|
/* This program is copyright (c) 2009-2013 by Roderick W. Smith. It is distributed
|
||||||
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
||||||
|
|
||||||
|
#ifndef __MBRSTRUCTS
|
||||||
|
#define __MBRSTRUCTS
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "gptpart.h"
|
#include "gptpart.h"
|
||||||
@@ -10,9 +13,6 @@
|
|||||||
#include "diskio.h"
|
#include "diskio.h"
|
||||||
#include "basicmbr.h"
|
#include "basicmbr.h"
|
||||||
|
|
||||||
#ifndef __MBRSTRUCTS
|
|
||||||
#define __MBRSTRUCTS
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/****************************************
|
/****************************************
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
/* This program is copyright (c) 2009-2018 by Roderick W. Smith. It is distributed
|
/* This program is copyright (c) 2009-2018 by Roderick W. Smith. It is distributed
|
||||||
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
||||||
|
|
||||||
|
#ifndef __PARTITION_TYPES
|
||||||
|
#define __PARTITION_TYPES
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifdef USE_UTF16
|
#ifdef USE_UTF16
|
||||||
@@ -12,9 +15,6 @@
|
|||||||
#include "support.h"
|
#include "support.h"
|
||||||
#include "guid.h"
|
#include "guid.h"
|
||||||
|
|
||||||
#ifndef __PARTITION_TYPES
|
|
||||||
#define __PARTITION_TYPES
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// A partition type
|
// A partition type
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
/* This program is copyright (c) 2009-2018 by Roderick W. Smith. It is distributed
|
/* This program is copyright (c) 2009-2018 by Roderick W. Smith. It is distributed
|
||||||
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
|
||||||
|
|
||||||
|
#ifndef __GPTSUPPORT
|
||||||
|
#define __GPTSUPPORT
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#ifndef __GPTSUPPORT
|
|
||||||
#define __GPTSUPPORT
|
|
||||||
|
|
||||||
#define GPTFDISK_VERSION "1.0.6"
|
#define GPTFDISK_VERSION "1.0.6"
|
||||||
|
|
||||||
#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
|
#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
|
||||||
|
|||||||
Reference in New Issue
Block a user