Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to further OSX compilation #738

Merged
merged 2 commits into from
Dec 6, 2017
Merged

Conversation

jdekonin
Copy link
Contributor

@jdekonin jdekonin commented Dec 1, 2017

The changes to j9porterror.h were originally from @DanHeidinga that I took over as per his agreement in #36. It needed a minor modification to compile on windows, an (I_32) addition.

#if defined (__GNUC__) || defined (AIXPPC)
#if defined (__GNUC__)
#if defined(__GNUC__) || defined(AIXPPC)
#if defined(__GNUC__) && !defined(OSX)
Copy link
Member

Choose a reason for hiding this comment

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

Can this be written as:

#if defined(OSX)
/*Use ._key for OSX*/
 +			if (buf.shm_perm._key != controlinfo->common.ftok_key)
#elif defined(__GNUC__)
			/*Use .__key for __GNUC__*/
  			if (buf.shm_perm.__key != controlinfo->common.ftok_key)		  			
#elif defined(AIXPPC) 
                        ......
#endif

#if defined (__GNUC__) || defined (AIXPPC) || defined(J9ZTPF)
#if defined (__GNUC__) && !defined(J9ZTPF)
#if defined(__GNUC__) || defined(AIXPPC) || defined(J9ZTPF)
#if defined(__GNUC__) && !defined(J9ZTPF) && !defined(OSX)
Copy link
Member

Choose a reason for hiding this comment

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

Can a similar refactoring as suggested above be done here as well?

@jdekonin jdekonin force-pushed the cast branch 2 times, most recently from 573fdbd to e798041 Compare December 4, 2017 14:42
@jdekonin
Copy link
Contributor Author

jdekonin commented Dec 4, 2017

Refactoring performed.

/*Use .key for AIXPPC*/
if (buf.sem_perm.key != controlinfo->ftok_key)
#endif
#if defined(J9ZTPF)
#elif defined(J9ZTPF)
/*Use .key for z/TPF */
Copy link
Member

Choose a reason for hiding this comment

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

Can you fix the comment spacing here since the files being modified anyway?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, sorry I should've caught that.

@DanHeidinga
Copy link
Member

@jdekonin Change looks good to me and I'll launch builds on it after the minor comment indenting issue is fixed

@DanHeidinga DanHeidinga self-assigned this Dec 5, 2017
Copy link
Member

@DanHeidinga DanHeidinga left a comment

Choose a reason for hiding this comment

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

lgtm

@DanHeidinga
Copy link
Member

Jenkins test sanity plinux

@DanHeidinga DanHeidinga merged commit 493126d into eclipse-openj9:master Dec 6, 2017
@jdekonin jdekonin deleted the cast branch March 12, 2018 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants