Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ jobs:
run: |
set -x
pacman -Sy --noconfirm --needed make rust base-devel
DESTDIR=/tmp/c make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n SKIP_UTILS=date # FIXME: build date
DESTDIR=/tmp/c make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n
# Check that utils are built with given profile
./target/release-small/true
# Check that the progs have prefix
Expand Down
13 changes: 9 additions & 4 deletions src/uu/date/src/locale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
macro_rules! cfg_langinfo {
($($item:item)*) => {
$(
#[cfg(all(unix, not(target_os = "android"), not(target_os = "redox")))]
#[cfg(all(unix, not(target_os = "android"), not(target_os = "cygwin"), not(target_os = "redox")))]
$item
)*
}
Expand All @@ -27,9 +27,9 @@ cfg_langinfo! {

/// glibc's `_DATE_FMT` has been stable for the last 12 years
/// being added upstream to libc TODO: update to libc
#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "cygwin"))]
const DATE_FMT: libc::nl_item = 0x2006c;
#[cfg(not(target_os = "linux"))]
#[cfg(not(any(target_os = "linux", target_os = "cygwin")))]
const DATE_FMT: libc::nl_item = libc::D_T_FMT;
}

Expand Down Expand Up @@ -110,7 +110,12 @@ cfg_langinfo! {
}

/// On platforms without nl_langinfo support, use 24-hour format by default
#[cfg(any(not(unix), target_os = "android", target_os = "redox"))]
#[cfg(any(
not(unix),
target_os = "android",
target_os = "cygwin",
target_os = "redox"
))]
pub fn get_locale_default_format() -> &'static str {
"%a %b %e %X %Z %Y"
}
Expand Down
Loading