From 441947337e37c15ba232c74f43ee84217bc282df Mon Sep 17 00:00:00 2001 From: "cantab.net!aia21" Date: Fri, 20 Feb 2004 14:44:16 +0000 Subject: [PATCH] Include config.h before any other non-ntfs headers. (Logical change 1.279) --- include/compat.h | 4 +++- include/device.h | 2 ++ include/device_io.h | 46 ++++++++++++++++++++++++++++++++++++ include/endians.h | 2 ++ include/gnome-vfs-method.h | 4 +++- include/gnome-vfs-module.h | 40 +++++++++++++++++++++++++++++++ include/support.h | 4 +++- libntfs/attrib.c | 2 ++ libntfs/bitmap.c | 4 +++- libntfs/bootsect.c | 4 +++- libntfs/compat.c | 4 +++- libntfs/compress.c | 2 ++ libntfs/debug.c | 4 +++- libntfs/dir.c | 4 +++- libntfs/inode.c | 4 +++- libntfs/lcnalloc.c | 4 +++- libntfs/mft.c | 4 +++- libntfs/mst.c | 4 +++- libntfs/runlist.c | 4 +++- libntfs/unistr.c | 2 ++ libntfs/volume.c | 4 +++- libntfs/win32_io.c | 3 +++ ntfsprogs/dumplog.c | 4 +++- ntfsprogs/ntfsdump_logfile.c | 4 +++- ntfsprogs/upcase.c | 4 +++- ntfsprogs/utils.c | 4 +++- ntfsprogs/utils.h | 3 +++ 27 files changed, 156 insertions(+), 18 deletions(-) diff --git a/include/compat.h b/include/compat.h index 81be6ef0..866f6ae7 100644 --- a/include/compat.h +++ b/include/compat.h @@ -2,7 +2,7 @@ * compat.h - Tweaks for Windows compatability. * * Copyright (c) 2002 Richard Russon - * Copyright (c) 2002 Anton Altaparmakov + * Copyright (c) 2002-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -23,6 +23,8 @@ #ifndef _NTFS_COMPAT_H #define _NTFS_COMPAT_H +#include "config.h" + #ifdef WINDOWS #ifndef HAVE_FFS diff --git a/include/device.h b/include/device.h index b5884d03..c9490cd9 100644 --- a/include/device.h +++ b/include/device.h @@ -22,6 +22,8 @@ #ifndef _NTFS_DEVICE_H #define _NTFS_DEVICE_H +#include "config.h" + #include #include "device_io.h" diff --git a/include/device_io.h b/include/device_io.h index e69de29b..03e03849 100644 --- a/include/device_io.h +++ b/include/device_io.h @@ -0,0 +1,46 @@ +/* + * device_io.h - Exports for default device io. Part of the Linux-NTFS project. + * + * Copyright (c) 2000-2004 Anton Altaparmakov + * + * This program/include file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program/include file is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program (in the main directory of the Linux-NTFS + * distribution in the file COPYING); if not, write to the Free Software + * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _NTFS_DEVICE_IO_H +#define _NTFS_DEVICE_IO_H + +#include "config.h" + +#ifndef __CYGWIN32__ + +/* Not on Cygwin; use standard Unix style low level device operations. */ +#define ntfs_device_default_io_ops ntfs_device_unix_io_ops + +#else /* __CYGWIN32__ */ + +/* On Cygwin; use Win32 low level device operations. */ +#define ntfs_device_default_io_ops ntfs_device_win32_io_ops + +#endif /* __CYGWIN32__ */ + + +/* Forward declaration. */ +struct ntfs_device_operations; + +extern struct ntfs_device_operations ntfs_device_default_io_ops; + +#endif /* defined _NTFS_DEVICE_IO_H */ + diff --git a/include/endians.h b/include/endians.h index 8debf61c..75f464d1 100644 --- a/include/endians.h +++ b/include/endians.h @@ -23,6 +23,8 @@ #ifndef _NTFS_ENDIANS_H #define _NTFS_ENDIANS_H +#include "config.h" + /* * Notes: * diff --git a/include/gnome-vfs-method.h b/include/gnome-vfs-method.h index 2a3f4ec3..ca7cb87a 100644 --- a/include/gnome-vfs-method.h +++ b/include/gnome-vfs-method.h @@ -3,7 +3,7 @@ * interface to libntfs. Par of the Linux-NTFS project. * * Copyright (c) 2002-2003 Jan Kratochvil - * Copyright (c) 2000-2002 Anton Altaparmakov + * Copyright (c) 2000-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -24,6 +24,8 @@ #ifndef _NTFS_GNOME_VFS_METHOD_H #define _NTFS_GNOME_VFS_METHOD_H +#include "config.h" + #include G_BEGIN_DECLS diff --git a/include/gnome-vfs-module.h b/include/gnome-vfs-module.h index e69de29b..7de4665c 100644 --- a/include/gnome-vfs-module.h +++ b/include/gnome-vfs-module.h @@ -0,0 +1,40 @@ +/* + * gnome-vfs-module.h - Exports for Gnome-VFS init/shutdown implementation of + * interface to libntfs. Part of the Linux-NTFS project. + * + * Copyright (c) 2003 Jan Kratochvil + * Copyright (c) 2000-2004 Anton Altaparmakov + * + * This program/include file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program/include file is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program (in the main directory of the Linux-NTFS + * distribution in the file COPYING); if not, write to the Free Software + * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _NTFS_GNOME_VFS_MODULE_H +#define _NTFS_GNOME_VFS_MODULE_H + +#include "config.h" + +G_BEGIN_DECLS + +G_LOCK_EXTERN(libntfs); + +#define libntfs_newn(objp, n) ((objp) = g_new(typeof(*(objp)), (n))) +#define libntfs_new(objp) (libntfs_newn((objp), 1)) +#define LIBNTFS_MEMZERO(objp) (memset((objp), 0, sizeof(*(objp)))) + +G_END_DECLS + +#endif /* _NTFS_GNOME_VFS_MODULE_H */ + diff --git a/include/support.h b/include/support.h index 181a79c9..3ddbb136 100644 --- a/include/support.h +++ b/include/support.h @@ -1,7 +1,7 @@ /* * support.h - Useful definitions and macros. Part of the Linux-NTFS project. * - * Copyright (c) 2000-2002 Anton Altaparmakov + * Copyright (c) 2000-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -22,6 +22,8 @@ #ifndef _NTFS_SUPPORT_H #define _NTFS_SUPPORT_H +#include "config.h" + #include /* diff --git a/libntfs/attrib.c b/libntfs/attrib.c index 0c600a12..e63af89d 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -20,6 +20,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/libntfs/bitmap.c b/libntfs/bitmap.c index f18fb52b..4d4af184 100644 --- a/libntfs/bitmap.c +++ b/libntfs/bitmap.c @@ -1,7 +1,7 @@ /* * bitmap.c - Bitmap handling code. Part of the Linux-NTFS project. * - * Copyright (c) 2002-2003 Anton Altaparmakov + * Copyright (c) 2002-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -19,6 +19,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/libntfs/bootsect.c b/libntfs/bootsect.c index 1827f552..7d7aa0b0 100644 --- a/libntfs/bootsect.c +++ b/libntfs/bootsect.c @@ -1,7 +1,7 @@ /* * bootsect.c - Boot sector handling code. Part of the Linux-NTFS project. * - * Copyright (c) 2000-2002 Anton Altaparmakov + * Copyright (c) 2000-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -19,6 +19,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/libntfs/compat.c b/libntfs/compat.c index c23616ff..8dd258d6 100644 --- a/libntfs/compat.c +++ b/libntfs/compat.c @@ -2,7 +2,7 @@ * compat.c - Tweaks for Windows compatability * * Copyright (c) 2002 Richard Russon - * Copyright (c) 2002 Anton Altaparmakov + * Copyright (c) 2002-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -22,6 +22,8 @@ #ifdef WINDOWS +#include "config.h" + #include "compat.h" // TODO: Add check for FFS in the configure script... (AIA) diff --git a/libntfs/compress.c b/libntfs/compress.c index 27e1b1eb..7600f604 100644 --- a/libntfs/compress.c +++ b/libntfs/compress.c @@ -20,6 +20,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/libntfs/debug.c b/libntfs/debug.c index 8463ee93..dd4df2fa 100644 --- a/libntfs/debug.c +++ b/libntfs/debug.c @@ -1,7 +1,7 @@ /* * debug.c - Debugging output functions. Part of the Linux-NTFS project. * - * Copyright (c) 2002 Anton Altaparmakov + * Copyright (c) 2002-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -19,6 +19,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include "debug.h" #ifdef DEBUG diff --git a/libntfs/dir.c b/libntfs/dir.c index 83897179..31796a8d 100644 --- a/libntfs/dir.c +++ b/libntfs/dir.c @@ -1,7 +1,7 @@ /* * dir.c - Directory handling code. Part of the Linux-NTFS project. * - * Copyright (c) 2002-2003 Anton Altaparmakov + * Copyright (c) 2002-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -19,6 +19,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/libntfs/inode.c b/libntfs/inode.c index 99bb9a91..22755339 100644 --- a/libntfs/inode.c +++ b/libntfs/inode.c @@ -1,7 +1,7 @@ /* * inode.c - Inode handling code. Part of the Linux-NTFS project. * - * Copyright (c) 2002 Anton Altaparmakov + * Copyright (c) 2002-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -19,6 +19,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/libntfs/lcnalloc.c b/libntfs/lcnalloc.c index 6e3afeaf..f6ad5708 100644 --- a/libntfs/lcnalloc.c +++ b/libntfs/lcnalloc.c @@ -1,7 +1,7 @@ /* * lcnalloc.c - Cluster (de)allocation code. Part of the Linux-NTFS project. * - * Copyright (c) 2002-2003 Anton Altaparmakov + * Copyright (c) 2002-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -19,6 +19,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/libntfs/mft.c b/libntfs/mft.c index d338aaeb..31785b73 100644 --- a/libntfs/mft.c +++ b/libntfs/mft.c @@ -1,7 +1,7 @@ /* * mft.c - Mft record handling code. Part of the Linux-NTFS project. * - * Copyright (c) 2000-2003 Anton Altaparmakov + * Copyright (c) 2000-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -19,6 +19,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/libntfs/mst.c b/libntfs/mst.c index 530b2722..8c539028 100644 --- a/libntfs/mst.c +++ b/libntfs/mst.c @@ -1,7 +1,7 @@ /* * mst.c - Multi sector fixup handling code. Part of the Linux-NTFS project. * - * Copyright (c) 2000-2002 Anton Altaparmakov + * Copyright (c) 2000-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -19,6 +19,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include "mst.h" #include diff --git a/libntfs/runlist.c b/libntfs/runlist.c index b60c2890..63c1082d 100644 --- a/libntfs/runlist.c +++ b/libntfs/runlist.c @@ -1,7 +1,7 @@ /* * runlist.c - Run list handling code. Part of the Linux-NTFS project. * - * Copyright (c) 2002-2003 Anton Altaparmakov + * Copyright (c) 2002-2004 Anton Altaparmakov * Copyright (c) 2002 Richard Russon * * This program/include file is free software; you can redistribute it and/or @@ -20,6 +20,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/libntfs/unistr.c b/libntfs/unistr.c index 2054a8b4..fcfcc4f8 100644 --- a/libntfs/unistr.c +++ b/libntfs/unistr.c @@ -19,6 +19,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/libntfs/volume.c b/libntfs/volume.c index 4e7e594a..afeb5802 100644 --- a/libntfs/volume.c +++ b/libntfs/volume.c @@ -1,7 +1,7 @@ /* * volume.c - NTFS volume handling code. Part of the Linux-NTFS project. * - * Copyright (c) 2000-2003 Anton Altaparmakov + * Copyright (c) 2000-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -19,6 +19,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/libntfs/win32_io.c b/libntfs/win32_io.c index 0f2ddae8..bfc7bf8c 100644 --- a/libntfs/win32_io.c +++ b/libntfs/win32_io.c @@ -21,6 +21,9 @@ * distribution in the file COPYING); if not, write to the Free Software * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include "config.h" + #include #include diff --git a/ntfsprogs/dumplog.c b/ntfsprogs/dumplog.c index db4b4559..a97a2039 100644 --- a/ntfsprogs/dumplog.c +++ b/ntfsprogs/dumplog.c @@ -1,7 +1,7 @@ /** * DumpLog - Part of the Linux-NTFS project. * - * Copyright (c) 2000-2002 Anton Altaparmakov + * Copyright (c) 2000-2004 Anton Altaparmakov * * This utility will interpret the contents of the journal ($LogFile) specified * on the command line and display the results on stdout. Errors will be output @@ -23,6 +23,8 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/ntfsprogs/ntfsdump_logfile.c b/ntfsprogs/ntfsdump_logfile.c index 276bd513..2315cb78 100644 --- a/ntfsprogs/ntfsdump_logfile.c +++ b/ntfsprogs/ntfsdump_logfile.c @@ -1,7 +1,7 @@ /** * NtfsDump_LogFile - Part of the Linux-NTFS project. * - * Copyright (c) 2000-2003 Anton Altaparmakov + * Copyright (c) 2000-2004 Anton Altaparmakov * * This utility will interpret the contents of the journal ($LogFile) of an * NTFS partition and display the results on stdout. Errors will be output to @@ -38,6 +38,8 @@ * Anton Altaparmakov */ +#include "config.h" + #include #include #include diff --git a/ntfsprogs/upcase.c b/ntfsprogs/upcase.c index 7d57dc7d..ea78d7c1 100644 --- a/ntfsprogs/upcase.c +++ b/ntfsprogs/upcase.c @@ -2,7 +2,7 @@ * upcase - Part of the Linux-NTFS project. * * Copyright (c) 2001 Richard Russon - * Copyright (c) 2001-2002 Anton Altaparmakov + * Copyright (c) 2001-2004 Anton Altaparmakov * * Modified for mkntfs inclusion 9 June 2001 by Anton Altaparmakov. * @@ -22,6 +22,8 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include "types.h" diff --git a/ntfsprogs/utils.c b/ntfsprogs/utils.c index 7b60db58..4854ebfb 100644 --- a/ntfsprogs/utils.c +++ b/ntfsprogs/utils.c @@ -2,7 +2,7 @@ * utils.c - Part of the Linux-NTFS project. * * Copyright (c) 2002-2003 Richard Russon - * Copyright (c) 2003 Anton Altaparmakov + * Copyright (c) 2003-2004 Anton Altaparmakov * Copyright (c) 2003 Lode Leroy * * A set of shared functions for ntfs utilities @@ -23,6 +23,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include diff --git a/ntfsprogs/utils.h b/ntfsprogs/utils.h index e4bbffbf..94a4bfb9 100644 --- a/ntfsprogs/utils.h +++ b/ntfsprogs/utils.h @@ -2,6 +2,7 @@ * utils.h - Part of the Linux-NTFS project. * * Copyright (c) 2002-2003 Richard Russon + * Copyright (c) 2004 Anton Altaparmakov * * A set of shared functions for ntfs utilities * @@ -24,6 +25,8 @@ #ifndef _NTFS_UTILS_H_ #define _NTFS_UTILS_H_ +#include "config.h" + #include "types.h" #include "layout.h" #include "volume.h"