Skip to content

Commit

Permalink
launch_daemon: GCC4 build fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
axeld committed Jul 23, 2015
1 parent c0958d1 commit 26f8579
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
10 changes: 5 additions & 5 deletions src/servers/launch/Conditions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ConditionContainer : public Condition {
virtual bool IsConstant(ConditionContext& context) const;

protected:
void ToString(BString& string) const;
void AddConditionsToString(BString& string) const;

protected:
BObjectList<Condition> fConditions;
Expand Down Expand Up @@ -199,7 +199,7 @@ ConditionContainer::IsConstant(ConditionContext& context) const


void
ConditionContainer::ToString(BString& string) const
ConditionContainer::AddConditionsToString(BString& string) const
{
string += "[";

Expand Down Expand Up @@ -243,7 +243,7 @@ BString
AndCondition::ToString() const
{
BString string = "and ";
ConditionContainer::ToString(string);
ConditionContainer::AddConditionsToString(string);
return string;
}

Expand Down Expand Up @@ -296,7 +296,7 @@ BString
OrCondition::ToString() const
{
BString string = "or ";
ConditionContainer::ToString(string);
ConditionContainer::AddConditionsToString(string);
return string;
}

Expand Down Expand Up @@ -332,7 +332,7 @@ BString
NotCondition::ToString() const
{
BString string = "not ";
ConditionContainer::ToString(string);
ConditionContainer::AddConditionsToString(string);
return string;
}

Expand Down
6 changes: 3 additions & 3 deletions src/servers/launch/Events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class EventContainer : public Event {
virtual void SetOwner(BaseJob* owner);

protected:
void ToString(BString& string) const;
void AddEventsToString(BString& string) const;

protected:
BaseJob* fOwner;
Expand Down Expand Up @@ -304,7 +304,7 @@ EventContainer::SetOwner(BaseJob* owner)


void
EventContainer::ToString(BString& string) const
EventContainer::AddEventsToString(BString& string) const
{
string += "[";

Expand Down Expand Up @@ -338,7 +338,7 @@ BString
OrEvent::ToString() const
{
BString string = "or ";
EventContainer::ToString(string);
EventContainer::AddEventsToString(string);
return string;
}

Expand Down
8 changes: 5 additions & 3 deletions src/servers/launch/Job.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include "Job.h"

#include <stdlib.h>

#include <Entry.h>
#include <Looper.h>
#include <Message.h>
Expand Down Expand Up @@ -342,7 +344,7 @@ Job::Launch()
BString signature("application/");
signature << Name();
return BRoster::Private().Launch(signature.String(), NULL, NULL,
0, NULL, environment.begin(), &fTeam);
0, NULL, &environment[0], &fTeam);
}

// Build argument vector
Expand All @@ -363,8 +365,8 @@ Job::Launch()
}

// Launch via entry_ref
return BRoster::Private().Launch(NULL, &ref, NULL, count, args.begin(),
environment.begin(), &fTeam);
return BRoster::Private().Launch(NULL, &ref, NULL, count, &args[0],
&environment[0], &fTeam);
}


Expand Down
8 changes: 5 additions & 3 deletions src/servers/launch/SettingsParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#include "SettingsParser.h"

#include <string.h>

#include <DriverSettingsMessageAdapter.h>


Expand Down Expand Up @@ -55,15 +57,15 @@ class ConditionConverter : public AbstractArgsConverter {
return B_OK;

BMessage* add = &target;
bool notExpr = parameter.value_count > 1
bool notOperator = parameter.value_count > 1
&& strcmp(parameter.values[0], "not") == 0;
if (notExpr) {
if (notOperator) {
add = &message;
index++;
}

status_t status = AddSubMessage(parameter, index, *add);
if (status == B_OK && notExpr)
if (status == B_OK && notOperator)
status = target.AddMessage("not", &message);

return status;
Expand Down

0 comments on commit 26f8579

Please sign in to comment.