-
Notifications
You must be signed in to change notification settings - Fork 414
AIX: implement xsetprogname and xgetprogname #4053
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
Conversation
AIX don't have xgetprogname & xsetprogname. Hence, we see an compilation error due to missing xgetprogname & xsetprogname. The proposed patch fixes the compilation error by implementing these missing function. We launch rpm program without any issue (other local changes). $ LIBPATH=/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10/pthread/ppc64 ./tools/rpm RPM version 6.0.90 Copyright (C) 1998-2002 - Red Hat, Inc. This program may be freely redistributed under the terms of the GNU GPL Usage: rpm [-afgpqlsiv?] [-a|--all] [-f|--file] [--path] [-g|--group] [-p|--package] [-q|--query] [--triggeredby]
|
Hmm, having written the above comment, I just realized one thing: This is not an AIX specific thing, is it? In that case it shouldn't be tied to the AIX platform but rather be part of the else branch, basically how it was before the commit mentioned above. I guess the same applies to #4051 as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah if we need it then lets resurrect the old generic implementation, it was only really dropped because it was broken and thus clearly not used by anything.
The issue with this smaller patch is that it redefines and initializes the "char *aix_progname = NULL" variable in every single compilation unit that includes system.h, and that happens to be every single source file in rpm. At least gcc refuses to compile such a construct at all. Variables need to defined in source files, not headers.
|
Ack, I'll do that. |
Turns out some platforms (such as AIX) don't implement these. Related: rpm-software-management#4053 This reverts commit fa06b68.
Fix minor issues with the original code reverted in the previous commit that prevented it from compiling cleanly (mostly around the const usage) and actually enable it if no system implementation is available (such as on AIX). Note that this new source file is tiny so it's included in libmisc instead of a new target, and librpm is linked against it. Related: rpm-software-management#4053
Turns out some platforms (such as AIX) don't implement these. Don't compile it just yet, it needs some fixing up, which will be done in the next commit. Related: rpm-software-management#4053 This reverts commit fa06b68.
Fix minor issues with the original code reverted in the previous commit that prevented it from compiling cleanly (mostly around the const usage) and actually enable it if no system implementation is available (such as on AIX). Note that this new source file is tiny so it's included in libmisc instead of a new target, and librpm is linked against it. Related: rpm-software-management#4053
AIX don't have xgetprogname & xsetprogname.
Hence, we see an compilation error due to missing xgetprogname & xsetprogname.
The proposed patch fixes the compilation error by implementing these missing function.
We can launch rpm program without any issue, and also run some query commands (With some local changes which we would be contributing).
$ LIBPATH=/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10/pthread/ppc64 ./tools/rpm RPM version 6.0.90
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL
Usage: rpm [-afgpqlsiv?] [-a|--all] [-f|--file] [--path] [-g|--group] [-p|--package] [-q|--query] [--triggeredby]
.......
Please review the changes and let us know if any comments.