mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-21 04:14:34 +00:00
tools: clean up mingw ifdefs
We have a header file specifically for mingw cruft, so keep it there to avoid crap spreading into the main tools. This lets our devs just worry about *nix systems. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
6705e036ce
commit
4f7136e7c5
2 changed files with 10 additions and 8 deletions
|
@ -34,6 +34,14 @@
|
||||||
#define MAP_SHARED 0x01 /* Share changes */
|
#define MAP_SHARED 0x01 /* Share changes */
|
||||||
#define MAP_PRIVATE 0x02 /* Changes are private */
|
#define MAP_PRIVATE 0x02 /* Changes are private */
|
||||||
|
|
||||||
|
/* File perms */
|
||||||
|
#ifndef S_IRGRP
|
||||||
|
# define S_IRGRP 0
|
||||||
|
#endif
|
||||||
|
#ifndef S_IWGRP
|
||||||
|
# define S_IWGRP 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Windows 64-bit access macros */
|
/* Windows 64-bit access macros */
|
||||||
#define LODWORD(x) ((DWORD)((DWORDLONG)(x)))
|
#define LODWORD(x) ((DWORD)((DWORDLONG)(x)))
|
||||||
#define HIDWORD(x) ((DWORD)(((DWORDLONG)(x) >> 32) & 0xffffffff))
|
#define HIDWORD(x) ((DWORD)(((DWORDLONG)(x) >> 32) & 0xffffffff))
|
||||||
|
|
|
@ -46,13 +46,6 @@
|
||||||
|
|
||||||
#define CRC_SIZE sizeof(uint32_t)
|
#define CRC_SIZE sizeof(uint32_t)
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
|
||||||
#define FILE_PERM (S_IRUSR | S_IWUSR)
|
|
||||||
#else
|
|
||||||
#define FILE_PERM (S_IRUSR | S_IWUSR | S_IRGRP |\
|
|
||||||
S_IWGRP)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void usage(const char *exec_name)
|
static void usage(const char *exec_name)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s [-h] [-r] [-b] [-p <byte>] -s <environment partition size> -o <output> <input file>\n"
|
fprintf(stderr, "%s [-h] [-r] [-b] [-p <byte>] -s <environment partition size> -o <output> <input file>\n"
|
||||||
|
@ -300,7 +293,8 @@ int main(int argc, char **argv)
|
||||||
if (!bin_filename || strcmp(bin_filename, "-") == 0) {
|
if (!bin_filename || strcmp(bin_filename, "-") == 0) {
|
||||||
bin_fd = STDOUT_FILENO;
|
bin_fd = STDOUT_FILENO;
|
||||||
} else {
|
} else {
|
||||||
bin_fd = creat(bin_filename, FILE_PERM);
|
bin_fd = creat(bin_filename, S_IRUSR | S_IWUSR | S_IRGRP |
|
||||||
|
S_IWGRP);
|
||||||
if (bin_fd == -1) {
|
if (bin_fd == -1) {
|
||||||
fprintf(stderr, "Can't open output file \"%s\": %s\n",
|
fprintf(stderr, "Can't open output file \"%s\": %s\n",
|
||||||
bin_filename, strerror(errno));
|
bin_filename, strerror(errno));
|
||||||
|
|
Loading…
Add table
Reference in a new issue