Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yakman2020
Copy link
Contributor

No description provided.

@palladia
Copy link
Contributor

Some comments, but look ok generally.

_Inout_ MI_DestinationOptions *options,
_In_z_ const MI_Char *certsdir)
{
if (options && options->ft)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're checking parameters, may as well check certsdir too.

if (options && options->ft && certsdir)

_In_ const MI_DestinationOptions *options,
_Outptr_result_z_ const MI_Char **certsdir)
{
if (options && options->ft)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check certsdir here too.

},

{NULL, 0, MI_RESULT_OK, 0, 0, NULL, NULL, NULL}
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea what's changed here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line endings, probably

END_EXTERNC



Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, can't tell what's changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line endings. dos line endings are preventing the build on solaris.

Unix/build.mak Outdated
ifdef BUILD_TESTS
tests:
( LD_LIBRARY_PATH=$(LIBDIR); export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(LIBDIR); export DYLD_LIBRARY_PATH; $(BINDIR)/nits -file:$(TMPDIR)/nitsargs.txt )
sudo sh -c "( LD_LIBRARY_PATH=$(LIBDIR); export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(LIBDIR); export DYLD_LIBRARY_PATH; $(BINDIR)/nits -file:$(TMPDIR)/nitsargs.txt )"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume there's a reason for sudo here, and in other places. Nevertheless, this bothers me...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently in order to run tests, or even build nits, you have to sudo make ; sudo make tests.
That means that pbuild can't run the regression tests as part of the build. Moving the sudo to the specific components in the makefiles means they can be built and run without elevation of the make.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not true. we don't need sudo to run tests. If you have previously run tests as sudo then you will either need to continue to use sudo, or blow away the output directory and start again as non-root.

extern MI_QualifierDecl gQualifiers[];

#endif /* _mof_qualifiers_h */

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both old and new have a large block enclosed by #if 0...#endif. What's different?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line endings. There are a lot of files with dos line endings interfering with compilation. I didn't do all of the line endings, but those that were preventing the build had to be changed.

#else
#define MI_LINKAGE MI_EXPORT
#endif
MI_EXPORT MI_Result MI_MAIN_CALL MI_Application_InitializeV1(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see MI_LINKAGE used anywhere. Why define these?

trace_AgentLaunch_Failed(scs(agentProgram), errno);
_exit(1);
return -1; /* never get here */
// return -1; /* never get here */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably here to tame a compiler that expects a return statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know which compiler? If so we can ifdef it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we successfully pbuild without this line I would suggest just deleting it instead of commenting it out or #ifdef-ing


size_t i;
WQL_SymbolEx symbols[WQL_MAX_SYMBOLS];
memset(&symbols[0], 0, sizeof(symbols));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

symbols is equivalent to &symbols[0]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The memset is the point.

Copy link
Contributor

@paulcallen paulcallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the sudos from the config files and the rest looks fine

Unix/build.mak Outdated
ifdef BUILD_TESTS
tests:
( LD_LIBRARY_PATH=$(LIBDIR); export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(LIBDIR); export DYLD_LIBRARY_PATH; $(BINDIR)/nits -file:$(TMPDIR)/nitsargs.txt )
sudo sh -c "( LD_LIBRARY_PATH=$(LIBDIR); export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(LIBDIR); export DYLD_LIBRARY_PATH; $(BINDIR)/nits -file:$(TMPDIR)/nitsargs.txt )"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not true. we don't need sudo to run tests. If you have previously run tests as sudo then you will either need to continue to use sudo, or blow away the output directory and start again as non-root.

trace_AgentLaunch_Failed(scs(agentProgram), errno);
_exit(1);
return -1; /* never get here */
// return -1; /* never get here */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we successfully pbuild without this line I would suggest just deleting it instead of commenting it out or #ifdef-ing

@yakman2020
Copy link
Contributor Author

Removed the sudos, fixed the mac CI issue (the server needs ld_library_path set) and rebased to georges latest changes.

@yakman2020 yakman2020 merged commit 3276834 into wsman-client-feature Sep 20, 2016
yakman2020 added a commit that referenced this pull request Sep 20, 2016
…nd macos. (#70)

* Fix builds on Solaris 10 platforms

Prior OS/X changes for SSL broke the Solaris builds

* Fixes for aix solaris hpux macos

* fix for solaris

* aix export libmi.so identifiers. provider use libmi

* dangling commas are illegal and caught by the sun compiler

* dos line endings making the solaris compiler sick

* Remove dos line endings from test_lex.cpp

* Removed the sudos

* Fixed macos regress problem. Since the server uses libmi.so it needs ld_library_path and dyld_library_path set.

* Fixed syntax error which causes problems with sun
paulcallen pushed a commit that referenced this pull request Sep 22, 2016
…nd macos. (#70)

* Fix builds on Solaris 10 platforms

Prior OS/X changes for SSL broke the Solaris builds

* Fixes for aix solaris hpux macos

* fix for solaris

* aix export libmi.so identifiers. provider use libmi

* dangling commas are illegal and caught by the sun compiler

* dos line endings making the solaris compiler sick

* Remove dos line endings from test_lex.cpp

* Removed the sudos

* Fixed macos regress problem. Since the server uses libmi.so it needs ld_library_path and dyld_library_path set.

* Fixed syntax error which causes problems with sun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants