Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
dc6ba8c6
Commit
dc6ba8c6
authored
12 years ago
by
Miller, Ross
Browse files
Options
Downloads
Patches
Plain Diff
Replace Linux-specific code with cross-platform code in ADARA files.
refs #5367
parent
4c7097f8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/ADARAParser.h
+2
-2
2 additions, 2 deletions
...amework/DataHandling/inc/MantidDataHandling/ADARAParser.h
Code/Mantid/Framework/DataHandling/src/ADARAParser.cpp
+7
-4
7 additions, 4 deletions
Code/Mantid/Framework/DataHandling/src/ADARAParser.cpp
with
9 additions
and
6 deletions
Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/ADARAParser.h
+
2
−
2
View file @
dc6ba8c6
...
...
@@ -3,7 +3,6 @@
#include
<string>
#include
<stdint.h>
#include
<time.h>
#include
"MantidDataHandling/ADARA.h"
#include
"MantidDataHandling/ADARAPackets.h"
...
...
@@ -30,7 +29,8 @@ public:
* limits the amount of maximum amount of data read and parsed
* from the file descriptor.
*/
bool
read
(
int
fd
,
unsigned
int
max_read
=
0
);
// Commented out in favor of the Poco version below for Mantid use
// bool read(int fd, unsigned int max_read = 0);
// Similar semantics as above: returns true if a timeout is set on the
// socket and we hit the timeout before reading max_read bytes.
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/Framework/DataHandling/src/ADARAParser.cpp
+
7
−
4
View file @
dc6ba8c6
#include
<string.h>
#include
<unistd.h>
#include
<errno.h>
#include
"MantidDataHandling/ADARAParser.h"
...
...
@@ -30,6 +28,11 @@ void Parser::reset(void)
m_oversize_len
=
0
;
}
#if 0
// Mantid doesn't use this, and trying to make it build on
// Windows would be a nightmare...
#include <unistd.h>
#include <errno.h>
bool Parser::read(int fd, unsigned int max_read)
{
unsigned long bytes_read = 0;
...
...
@@ -63,13 +66,13 @@ bool Parser::read(int fd, unsigned int max_read)
return true;
}
#endif
/* Added by RGM, 17 May 2012 */
bool
Parser
::
read
(
Poco
::
Net
::
StreamSocket
&
stream
,
unsigned
int
max_read
)
{
unsigned
long
bytes_read
=
0
;
ssize_
t
rc
;
in
t
rc
;
while
(
!
max_read
||
bytes_read
<
max_read
)
{
try
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment