Skip to content
Snippets Groups Projects
Commit 3a04b442 authored by Eric Cano's avatar Eric Cano Committed by Steven Murray
Browse files

Replaced #ifdef based multiple include guards by #pragma once.

Fixed h/rfcntl.h which missed multiple inclusion guards entirely.
parent cea8e39b
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 60 deletions
......@@ -11,8 +11,7 @@
* @(#)Castor_limits.h,v 1.27 2004/02/12 15:38:08 CERN IT-PDP/DM Jean-Philippe Baud
*/
#ifndef _CASTOR_LIMITS_H
#define _CASTOR_LIMITS_H
#pragma once
/* all maximum lengths defined below do not include the trailing null */
......@@ -70,4 +69,3 @@
/* Max allowed uid/gif */
#define CA_MAXUID 0x7FFFFFFF /* Maximum uid */
#define CA_MAXGID 0x7FFFFFFF /* Maximum gid */
#endif
......@@ -23,9 +23,7 @@
* @author sponcec3
*****************************************************************************/
#ifndef H_CDOMAINNAME_H
#define H_CDOMAINNAME_H 1
#pragma once
EXTERN_C int Cdomainname (char*, int);
#endif /* H_CDOMAINNAME_H */
......@@ -7,8 +7,7 @@
* All rights reserved
*/
#ifndef _CASTOR_GLOBALS_H
#define _CASTOR_GLOBALS_H
#pragma once
#include <osdep.h>
#include <stddef.h> /* For size_t */
......@@ -19,4 +18,3 @@ EXTERN_C void Cglobals_init (int (*) (int *, void **),
EXTERN_C int Cglobals_get (int *, void **, size_t size);
EXTERN_C void Cglobals_getTid (int *);
#endif /* _CASTOR_GLOBALS_H */
......@@ -10,8 +10,7 @@
/*
*/
#ifndef _CINIT_H
#define _CINIT_H
#pragma once
#include "osdep.h"
......@@ -24,4 +23,3 @@ struct main_args {
EXTERN_C int Cinitdaemon (char *, void (*) (int));
#endif
......@@ -7,8 +7,7 @@
*/
#ifndef _CNETDB_H
#define _CNETDB_H
#pragma once
#include <osdep.h>
#include <netdb.h>
......@@ -17,4 +16,3 @@ EXTERN_C struct hostent *Cgethostbyname (const char *);
EXTERN_C struct hostent *Cgethostbyaddr (const void *, size_t, int);
EXTERN_C struct servent *Cgetservbyname (const char *, const char *);
#endif /* _CNETDB_H */
......@@ -12,8 +12,7 @@
/* marshall.h - marshalling/unmarshalling definitions */
#ifndef _MARSHALL_H_INCLUDED_
#define _MARSHALL_H_INCLUDED_
#pragma once
#include <osdep.h> /* Operating system dependencies */
#include <memory.h> /* memory operations definition */
......@@ -196,4 +195,3 @@ EXTERN_C int _unmarshall_STRINGN (char **, char*, int);
n = (time_t) _unmarshall_time_dummy; \
}
#endif /* _MARSHALL_H_INCLUDED_ */
......@@ -20,8 +20,7 @@
* @author castor dev team
*****************************************************************************/
#ifndef _NET_H
#define _NET_H
#pragma once
#include <osdep.h>
#include <sys/types.h>
......@@ -35,4 +34,3 @@ EXTERN_C ssize_t netread_timeout (int, void *, ssize_t, int);
EXTERN_C ssize_t netwrite_timeout (int, void *, ssize_t, int);
EXTERN_C int netconnect_timeout (int, struct sockaddr *, size_t, int);
#endif /* _NET_H */
......@@ -12,8 +12,7 @@
/* osdep.h Operating system dependencies */
#ifndef _OSDEP_H_INCLUDED_
#define _OSDEP_H_INCLUDED_
#pragma once
/*
* Data representation
......@@ -71,4 +70,3 @@ typedef U_HYPER TIME_T;
#define off64_t off_t
#endif
#endif /* _OSDEP_H_INCLUDED_ */
......@@ -12,8 +12,7 @@
/* patchlevel.h Patch level */
#ifndef _PATCHLEVEL_H_INCLUDED_
#define _PATCHLEVEL_H_INCLUDED_
#pragma once
#define MAJORVERSION @MAJOR_CASTOR_VERSION_TOP@
#define MINORVERSION @MAJOR_CASTOR_VERSION_BOTTOM@
......@@ -23,4 +22,3 @@
#define PATCHLEVEL MINORRELEASE
#endif /* _PATCHLEVEL_H_INCLUDED_ */
......@@ -23,8 +23,7 @@
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#ifndef _RBTSUBR_CONSTANTS_H
#define _RBTSUBR_CONSTANTS_H 1
#pragma once
/* rbtsubr return codes */
......@@ -39,4 +38,3 @@
#define RBT_OMSGR 8 /* Should send a msg to operator and wait */
#define RBT_UNLD_DMNT 9 /* Should unload the tape and retry demount */
#endif
......@@ -10,8 +10,7 @@
/*
*/
#ifndef _RMC_API_H
#define _RMC_API_H
#pragma once
#include "h/osdep.h"
#include "h/smc_struct.h"
......@@ -31,4 +30,3 @@ EXTERN_C int send2rmc(const char *const host, const char *const reqp, const int
EXTERN_C int rmc_mnt(const char *const vid, const char *const drive);
EXTERN_C int rmc_unmnt(const char *const vid, const char *const drive);
#endif
......@@ -10,8 +10,7 @@
/*
*/
#ifndef _RMC_CONSTANTS_H
#define _RMC_CONSTANTS_H
#pragma once
#include "Castor_limits.h"
#define RMC_CHECKI 5 /* max interval to check for work to be done */
......@@ -63,4 +62,3 @@
#define RMC92 "RMC92 - %s request by %d,%d from %s\n"
#define RMC98 "RMC98 - %s\n"
#endif
......@@ -27,8 +27,7 @@
* and its client software and should therefore not be distributed to end users
*****************************************************************************/
#ifndef RMC_FIND_CHAR_H
#define RMC_FIND_CHAR_H 1
#pragma once
/**
* Returns the index of the specified character within the specified string.
......@@ -41,4 +40,3 @@
*/
int rmc_find_char(const char *const str, const char c);
#endif /* RMC_FIND_CHAR_H */
......@@ -27,8 +27,7 @@
* and its client software and should therefore not be distributed to end users
*****************************************************************************/
#ifndef RMC_GET_ACS_DRIVE_ID_H
#define RMC_GET_ACS_DRIVE_ID_H 1
#pragma once
/**
* Structure representing the identifier of a drive withn an ACS compatible
......@@ -58,4 +57,3 @@ struct rmc_acs_drive_id {
int rmc_get_acs_drive_id(const char *const drive,
struct rmc_acs_drive_id *const drive_id);
#endif /* RMC_GET_ACS_DRIVE_ID_H */
......@@ -27,8 +27,7 @@
* and its client software and should therefore not be distributed to end users
*****************************************************************************/
#ifndef RMC_GET_LOADER_TYPE_H
#define RMC_GET_LOADER_TYPE_H 1
#pragma once
typedef enum {
RMC_LOADER_TYPE_ACS,
......@@ -51,4 +50,3 @@ typedef enum {
*/
rmc_loader_type rmc_get_loader_type(const char *const drive);
#endif /* RMC_GET_LOADER_TYPE_H */
......@@ -27,8 +27,7 @@
* and its client software and should therefore not be distributed to end users
*****************************************************************************/
#ifndef RMC_GET_RMC_HOST_OF_DRIVE_H
#define RMC_GET_RMC_HOST_OF_DRIVE_H 1
#pragma once
/**
* Returns the rmc host of the specified drive string. The drive string either
......@@ -48,4 +47,3 @@
int rmc_get_rmc_host_of_drive(const char *const drive,
char *const rmc_host_buf, const int rmc_host_buflen);
#endif /* RMC_GET_RMC_HOST_OF_DRIVE_H */
......@@ -3,9 +3,7 @@
* All rights reserved
*/
#ifndef _RMC_LOGIT_H
#define _RMC_LOGIT_H 1
#pragma once
int rmc_logit(const char *const func, const char *const msg, ...);
#endif
......@@ -3,9 +3,7 @@
* All rights reserved
*/
#ifndef _RMC_LOGREQ_H
#define _RMC_LOGREQ_H 1
#pragma once
void rmc_logreq(const char *const func, char *const logbuf);
#endif
......@@ -3,11 +3,9 @@
* All rights reserved
*/
#ifndef _RMC_MARSHALL_ELEMENT_H
#define _RMC_MARSHALL_ELEMENT_H 1
#pragma once
#include "h/smc_struct.h"
int rmc_marshall_element (char **const sbpp, const struct smc_element_info *const element_info);
#endif
......@@ -23,8 +23,7 @@
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#ifndef _RMC_PROCREQ_H
#define _RMC_PROCREQ_H 1
#pragma once
struct rmc_srv_rqst_context {
const char *localhost;
......@@ -43,4 +42,3 @@ int rmc_srv_unmount(const struct rmc_srv_rqst_context *const rqst_context);
int rmc_srv_acs_mnt(const struct rmc_srv_rqst_context *const rqst_context);
int rmc_srv_acs_unmnt(const struct rmc_srv_rqst_context *const rqst_context);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment