-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for ARM and add missing include dir for libuuid.
- Loading branch information
David Abdurachmanov
committed
Feb 26, 2013
1 parent
251b65a
commit 20f6afe
Showing
3 changed files
with
233 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
diff --git a/gridftp2/external/Imakefile b/gridftp2/external/Imakefile | ||
index 049e172..dfccf07 100644 | ||
--- a/gridftp2/external/Imakefile | ||
+++ b/gridftp2/external/Imakefile | ||
@@ -24,7 +24,9 @@ COMM | ||
COMM @author castor-dev@cern.ch | ||
COMM | ||
|
||
-MOPTION=-m32 | ||
+ifeq ($(shell uname -m), i386) | ||
+ MOPTION=-m32 | ||
+endif | ||
ifeq ($(shell uname -m), x86_64) | ||
MOPTION=-m64 | ||
endif | ||
diff --git a/gridftp2/internal/Imakefile b/gridftp2/internal/Imakefile | ||
index 4e1378e..30dbdfd 100644 | ||
--- a/gridftp2/internal/Imakefile | ||
+++ b/gridftp2/internal/Imakefile | ||
@@ -24,7 +24,9 @@ COMM | ||
COMM @author castor-dev@cern.ch | ||
COMM | ||
|
||
-MOPTION=-m32 | ||
+ifeq ($(shell uname -m), i386) | ||
+ MOPTION=-m32 | ||
+endif | ||
ifeq ($(shell uname -m), x86_64) | ||
MOPTION=-m64 | ||
endif | ||
diff --git a/gridftp2/xroot/Imakefile b/gridftp2/xroot/Imakefile | ||
index d915dcb..29a523d 100644 | ||
--- a/gridftp2/xroot/Imakefile | ||
+++ b/gridftp2/xroot/Imakefile | ||
@@ -24,7 +24,9 @@ COMM | ||
COMM @author castor-dev@cern.ch | ||
COMM | ||
|
||
-MOPTION=-m32 | ||
+ifeq ($(shell uname -m), i386) | ||
+ MOPTION=-m32 | ||
+endif | ||
ifeq ($(shell uname -m), x86_64) | ||
MOPTION=-m64 | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
diff --git a/castor/server/BaseDaemon.cpp b/castor/server/BaseDaemon.cpp | ||
index 4a213e6..cdf1c60 100644 | ||
--- a/castor/server/BaseDaemon.cpp | ||
+++ b/castor/server/BaseDaemon.cpp | ||
@@ -166,9 +166,9 @@ void castor::server::BaseDaemon::parseCommandLine(int argc, char *argv[]) | ||
Copterr = 0; | ||
Coptreset = 1; | ||
|
||
- char c; | ||
+ int c; | ||
while ((c = Cgetopt_long(argc, argv, (char*)m_cmdLineParams.str().c_str(), longopts, NULL)) != -1) { | ||
- switch (c) { | ||
+ switch ((char)c) { | ||
case 'f': | ||
m_foreground = true; | ||
break; | ||
diff --git a/client/src/stager/stager_client_commandline.cpp b/client/src/stager/stager_client_commandline.cpp | ||
index 0139846..f8919f0 100644 | ||
--- a/client/src/stager/stager_client_commandline.cpp | ||
+++ b/client/src/stager/stager_client_commandline.cpp | ||
@@ -184,8 +184,7 @@ extern "C" { | ||
int parseCmdLine(int argc, char *argv[], int (*callback)(const char *), | ||
char** service_class, char** usertag, int* display_reqid) | ||
{ | ||
- int Coptind, Copterr, errflg; | ||
- char c; | ||
+ int Coptind, Copterr, errflg, c; | ||
static struct Coptions longopts[] = | ||
{ | ||
{"filename", REQUIRED_ARGUMENT, NULL, 'M'}, | ||
@@ -202,7 +201,7 @@ int parseCmdLine(int argc, char *argv[], int (*callback)(const char *), | ||
errflg = 0; | ||
|
||
while ((c = Cgetopt_long (argc, argv, "f:M:S:U:rh", longopts, NULL)) != -1) { | ||
- switch (c) { | ||
+ switch ((char)c) { | ||
case 'M': | ||
if (0 != callback) { | ||
callback(Coptarg); | ||
diff --git a/client/src/stager/stager_qry.cpp b/client/src/stager/stager_qry.cpp | ||
index e330017..90068a8 100644 | ||
--- a/client/src/stager/stager_qry.cpp | ||
+++ b/client/src/stager/stager_qry.cpp | ||
@@ -324,8 +324,7 @@ void handleDiskPoolQuery(int argc, char *argv[]) { | ||
// ----------------------------------------------------------------------- | ||
int parseCmdLineFileQuery(int argc, char *argv[], | ||
struct cmd_args *args) { | ||
- int nbargs, errflg, getNextMode, i; | ||
- char c; | ||
+ int nbargs, errflg, getNextMode, i, c; | ||
|
||
Coptind = 1; | ||
Copterr = 1; | ||
@@ -335,7 +334,7 @@ int parseCmdLineFileQuery(int argc, char *argv[], | ||
while ((c = Cgetopt_long (argc, argv, | ||
"M:f:E:F:U:r:nS:", | ||
longopts_fileQuery, NULL)) != -1) { | ||
- switch (c) { | ||
+ switch ((char)c) { | ||
case 'M': | ||
args->requests[nbargs].type = BY_FILENAME; | ||
args->requests[nbargs].param = (char *)strdup(Coptarg); | ||
@@ -419,8 +418,7 @@ int parseCmdLineFileQuery(int argc, char *argv[], | ||
int parseCmdLineDiskPoolQuery(int argc, char *argv[], | ||
char** diskPool, char** svcClass, int *siflag, | ||
enum castor::query::DiskPoolQueryType* queryType) { | ||
- int errflg; | ||
- char c; | ||
+ int errflg, c; | ||
|
||
Coptind = 1; | ||
Copterr = 1; | ||
@@ -430,7 +428,7 @@ int parseCmdLineDiskPoolQuery(int argc, char *argv[], | ||
while ((c = Cgetopt_long (argc, argv, | ||
"sd:S:iHat", | ||
longopts_diskPoolQuery, NULL)) != -1) { | ||
- switch (c) { | ||
+ switch ((char)c) { | ||
case 'd': | ||
*diskPool = (char *)strdup(Coptarg); | ||
break; | ||
@@ -465,8 +463,7 @@ int parseCmdLineDiskPoolQuery(int argc, char *argv[], | ||
// ----------------------------------------------------------------------- | ||
int checkAndCountArguments(int argc, char *argv[], | ||
int* count, enum queryType* type) { | ||
- int errflg; | ||
- char c; | ||
+ int errflg, c; | ||
|
||
Coptind = 1; | ||
Copterr = 1; | ||
@@ -475,7 +472,7 @@ int checkAndCountArguments(int argc, char *argv[], | ||
*type = FILEQUERY; | ||
while ((c = Cgetopt_long | ||
(argc, argv, "M:f:F:U:r:nhsd:S:iHat", longopts, NULL)) != -1) { | ||
- switch (c) { | ||
+ switch ((char)c) { | ||
case 'M': | ||
case 'F': | ||
case 'U': | ||
diff --git a/client/src/stager/stager_rm.c b/client/src/stager/stager_rm.c | ||
index 162ef3f..16d2831 100644 | ||
--- a/client/src/stager/stager_rm.c | ||
+++ b/client/src/stager/stager_rm.c | ||
@@ -98,8 +98,7 @@ int cmd_parse(int argc, | ||
struct stage_filereq **reqs, | ||
int* nbreqs, | ||
struct stage_options* opts) { | ||
- int nbfiles, Coptind, Copterr, errflg; | ||
- char c; | ||
+ int nbfiles, Coptind, Copterr, errflg, c; | ||
|
||
/* Counting the number of HSM files */ | ||
if ((*nbreqs = cmd_countHsmFiles(argc, argv)) < 0) { | ||
@@ -118,7 +117,7 @@ int cmd_parse(int argc, | ||
nbfiles = 0; | ||
while ((c = Cgetopt_long | ||
(argc, argv, "M:f:S:ha", longopts, NULL)) != -1) { | ||
- switch (c) { | ||
+ switch ((char)c) { | ||
case 'M': | ||
(*reqs)[nbfiles].filename = Coptarg; | ||
nbfiles++; | ||
@@ -169,15 +168,14 @@ int cmd_parse(int argc, | ||
* or -1 if an error occured | ||
*/ | ||
int cmd_countHsmFiles(int argc, char *argv[]) { | ||
- int Coptind, Copterr, errflg, nbargs; | ||
- char c; | ||
+ int Coptind, Copterr, errflg, nbargs, c; | ||
|
||
Coptind = 1; | ||
Copterr = 1; | ||
errflg = 0; | ||
nbargs = 0; | ||
while ((c = Cgetopt_long (argc, argv, "S:M:f:ha", longopts, NULL)) != -1) { | ||
- switch (c) { | ||
+ switch ((char)c) { | ||
case 'M': | ||
nbargs++;; | ||
break; | ||
diff --git a/client/src/stager/stager_setFileGCWeight.c b/client/src/stager/stager_setFileGCWeight.c | ||
index 6063fe4..3d97371 100644 | ||
--- a/client/src/stager/stager_setFileGCWeight.c | ||
+++ b/client/src/stager/stager_setFileGCWeight.c | ||
@@ -95,8 +95,7 @@ int cmd_parse(int argc, | ||
char *argv[], | ||
struct stage_filereq **reqs, | ||
int* nbreqs, char **service_class, float *weight) { | ||
- int nbfiles, Coptind, Copterr, errflg; | ||
- char c; | ||
+ int nbfiles, Coptind, Copterr, errflg, c; | ||
|
||
/* Counting the number of HSM files */ | ||
if ((*nbreqs = cmd_countHsmFiles(argc, argv)) < 0) { | ||
@@ -115,7 +114,7 @@ int cmd_parse(int argc, | ||
nbfiles = 0; | ||
while ((c = Cgetopt_long | ||
(argc, argv, "M:S:h", longopts, NULL)) != -1) { | ||
- switch (c) { | ||
+ switch ((char)c) { | ||
case 'M': | ||
(*reqs)[nbfiles].filename = Coptarg; | ||
nbfiles++; | ||
@@ -153,15 +152,14 @@ int cmd_parse(int argc, | ||
* or -1 if an error occured | ||
*/ | ||
int cmd_countHsmFiles(int argc, char *argv[]) { | ||
- int Coptind, Copterr, errflg, nbargs; | ||
- char c; | ||
+ int Coptind, Copterr, errflg, nbargs, c; | ||
|
||
Coptind = 1; | ||
Copterr = 1; | ||
errflg = 0; | ||
nbargs = 0; | ||
while ((c = Cgetopt_long (argc, argv, "M:S:h", longopts, NULL)) != -1) { | ||
- switch (c) { | ||
+ switch ((char)c) { | ||
case 'M': | ||
nbargs++;; | ||
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters