Skip to content

Conversation

@dmitry-starodubov
Copy link
Collaborator

No description provided.

@AlexPeshkoff AlexPeshkoff merged commit c3722be into FirebirdSQL:master May 25, 2016
rc = ::open(pathname, flags, mode);
#endif
} while (rc == -1 && SYSCALL_INTERRUPTED(errno));
return rc;
Copy link
Member

Choose a reason for hiding this comment

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

Indentation of all "} while" in this file is incorrectly done with spaces intead of tabs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, I will fix it.

Dmitry Starodubov

25.05.2016 15:19, Adriano dos Santos Fernandes пишет:

In src/common/common.h
#28 (comment):

+#ifdef WIN_NT
+#define mode_t int
+#endif
+
+namespace fb_io {
+
+inline int open(const char* pathname, int flags, mode_t mode = 0666) {

  • int rc;
  • do {
    +#ifdef LSB_BUILD
  •   rc = open64(pathname, flags, mode);
    
    +#else
  •   rc = ::open(pathname, flags, mode);
    
    +#endif
  •    } while (rc == -1 && SYSCALL_INTERRUPTED(errno));
    
  • return rc;

Indentation of all "} while" in this file is incorrectly done with
spaces intead of tabs.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/FirebirdSQL/firebird/pull/28/files/39c19e5c8eae58030ce5d8c1ae9b402a48e4c516#r64561674

@aafemt
Copy link
Contributor

aafemt commented May 25, 2016

It would be better to use os_utils namespace in posix module instead of polluting global common header. In this case ugly macros also won't be needed.

$(MAKE) -C $(ROOT)/extern/btyacc
$(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop
$(MAKE) -C $(ROOT)/extern/btyacc CC="$(CC)" CXX="$(CXX)"
$(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop CC="$(CC)" CXX="$(CXX)"
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the point to pass variables via parameters to every child make process instead of exporting them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Some of the functions from fb_io used in Windows too. So Windows module also will be changed. And what macros do you mean?
Exporting variables to sub-make works fine, thanks. I will fix it.

Copy link
Contributor

@aafemt aafemt May 25, 2016

Choose a reason for hiding this comment

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

STAT, FSTAT, LSTAT and so on.
Function that are used in Windows either don't need to be hidden in macros or may be implemented slightly differently. You can inline them in os_utils.h instead of common.h. Look at my unicode branch for examples: https://github.com/aafemt/firebird/blob/unicode/src/common/os/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants