Closed
Bug 137059
Opened 23 years ago
Closed 23 years ago
configure outputs incorrect definition for DEFINES if whoami returns a name with a space
Categories
(SeaMonkey :: Build Config, defect, P4)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.2alpha
People
(Reporter: jonwil, Assigned: netscape)
References
Details
Attachments
(1 file, 2 obsolete files)
2.64 KB,
patch
|
dmosedale
:
review+
|
Details | Diff | Splinter Review |
On my system, whoami (from cygwin) returns Jonathan Wilson
This causes something inside configure to define DEFINES as
-DDEBUG_Jonathan=Wilson\ 1 (plus other defines).
Is this infact a problem with configure and if so, what do we do to fix it?
Assignee | ||
Comment 1•23 years ago
|
||
This is questionably a problem with configure. We don't support spaces in
usernames and that's what's causing whomai to return that bogus value.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 2•23 years ago
|
||
Accepting this bug, fix should be available shortly
Status: NEW → ASSIGNED
Reporter | ||
Comment 3•23 years ago
|
||
I got a fix for this bug available but I cant make a patch since my configure.in
files have changed because of bug 134113
You change line 323 of nsprpub/configure.in to this
AC_DEFINE_UNQUOTED(DEBUG_`$WHOAMI | sed -e's/ /_/g;'`)
and line 3316 of configure.in to this
MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`echo ${USERNAME}
| sed -e's/ /_/g;'`"
Anyone that has vanila configure.in files want to do the changes then post a fix
to the bug?
Comment 4•23 years ago
|
||
Comment 5•23 years ago
|
||
Attachment #81145 -
Attachment is obsolete: true
Comment 6•23 years ago
|
||
I suggest that we simply not define the DEBUG_`$WHOAMI` macro.
This is what I will do to the NSPR build system (bug 140399).
In fact I doubt anyone is using the DEBUG_`$WHOAMI` macro now.
Depends on: 140399
Assignee | ||
Comment 7•23 years ago
|
||
Well, it's not used in NSPR but it is used all over the rest of the tree, as an
lxr for DEBUG_ will show (or DEBUG_<your favorite hacker here>). I don't see
any benefit of dropping the define at this point.
Assignee | ||
Updated•23 years ago
|
Priority: -- → P4
Target Milestone: --- → mozilla1.0.1
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla1.0.1 → mozilla1.1beta
Assignee | ||
Comment 9•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Attachment #81147 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla1.1beta → mozilla1.2alpha
Comment 10•23 years ago
|
||
Comment on attachment 94527 [details] [diff] [review]
drop whoami for win32 & fix ldap too
r=dmose@netscape.com
Attachment #94527 -
Flags: review+
Comment 11•23 years ago
|
||
Comment on attachment 94527 [details] [diff] [review]
drop whoami for win32 & fix ldap too
r=mcs
Assignee | ||
Comment 12•23 years ago
|
||
The patch has been checked into:
mozilla trunk
nspr trunk
ldap trunk
nspr NSPRPUB_PRE_4_2_CLIENT_BRANCH
ldap ldapcsdk_50_client_branch
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 13•23 years ago
|
||
Comment on attachment 94527 [details] [diff] [review]
drop whoami for win32 & fix ldap too
>+ case "${target_os}" in
>+ beos*)
>+ DEFINES="$DEFINES -DDEBUG_${USER}"
>+ ;;
>+ msvc*|mksnt*|cygwin*|mingw*)
>+ DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
>+ ;;
>+ *)
>+ DEFINES="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`$WHOAMI`"
>+ ;;
>+ esac
MOZ_DEBUG_ENABLE_DEFS is not defined in mozilla/nsprpub/configure.in.
Perhaps the code for the default case should say:
DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
Comment 14•23 years ago
|
||
Just wondering:
Why is "whoami" used at all ? AFAIK the ${LOGNAME} env variable provides the
same info...
Comment 15•23 years ago
|
||
Comment on attachment 94527 [details] [diff] [review]
drop whoami for win32 & fix ldap too
In nsprpub/configure.in, I changed
DEFINES="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`$WHOAMI`"
to
DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
on the tip and NSPRPUB_PRE_4_2_CLIENT_BRANCH of NSPR.
The same change needs to be made to directory/c-sdk/configure.in.
Attachment #94527 -
Flags: needs-work+
Comment 16•23 years ago
|
||
wtc:
Any idea why we use "whoami" and not $LOGNAME ?
Comment 17•23 years ago
|
||
The use of "whoami" comes from the original
Netscape browser build system (ns/config/*.mk).
I don't know why it used "whoami", not $LOGNAME.
Comment 18•23 years ago
|
||
Wan-Teh Chang wrote:
> I don't know why it used "whoami", not $LOGNAME
What about killing all the "whoami" stuff and simply use $LOGNAME instead ?
Assignee | ||
Comment 19•23 years ago
|
||
FWIW, $LOGNAME is not universal either. LOGNAME is not set when using the BeOS
version of bash. $USER is as close as you'll get to having universal coverage
afaict and even that's not set by win32's cmd.exe.
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•