'2021/07/09'에 해당되는 글 2건

  1. 2021.07.09 glibc 버전 얻기
  2. 2021.07.09 fopen exclusivly
Linux2021. 7. 9. 10:42

ldd나 getconf 등으로 얻을수도 있지만, 임베디드에서는 해당 실행 파일을 넣지 않는 경우도 있어서 멘붕

[링크 : https://ososoi.tistory.com/79]

[링크 : https://www.linuxquestions.org/questions/linux-software-2/how-to-check-glibc-version-263103/]

 

라이브러리 버전을 보면 보이긴 한데.. 확실하게 확인하고 싶으니까 좀 더 찾아보니

# ls -al /lib/libc*
-rwxr-xr-x    1 root     root       1230544 Jan  1  1970 /lib/libc-2.26.so
lrwxrwxrwx    1 root     root            12 Jan  1  1970 /lib/libc.so.6 -> libc-2.26.so

 

so 인데 실행이 되는게 신기하긴 하네..

# /lib/libc.so.6
GNU C Library (Buildroot) stable release version 2.26, by Roland McGrath et al.
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 6.4.0.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
libc ABIs: UNIQUE
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

 

[링크 : https://dev.to/0xbf/how-to-get-glibc-version-c-lang-26he]

 

Posted by 구차니
Programming/C Win32 MFC2021. 7. 9. 10:35

 

NOTES
   Glibc notes
       The GNU C library allows the following extensions for the string specified in mode:

       c (since glibc 2.3.3)
              Do not make the open operation, or subsequent read and write operations, thread cancellation points.  This flag is ignored for fdopen().

       e (since glibc 2.7)
              Open the file with the O_CLOEXEC flag.  See open(2) for more information.  This flag is ignored for fdopen().

       m (since glibc 2.3)
              Attempt to access the file using mmap(2), rather than I/O system calls (read(2), write(2)).  Currently, use of mmap(2) is attempted only for a file opened for reading.

       x      Open the file exclusively (like the O_EXCL flag of open(2)).  If the file already exists, fopen() fails, and sets errno to EEXIST.  This flag is ignored for fdopen().

[링크 : https://stackoverflow.com/questions/33312900/how-to-forbid-multiple-fopen-of-same-file]

[링크 : https://stackoverflow.com/questions/16806998/is-fopen-a-thread-safe-function-in-linux]

'Programming > C Win32 MFC' 카테고리의 다른 글

MSB / LSB 변환  (0) 2022.08.29
kore - c restful api server  (0) 2022.07.07
vs2019 sdi , mdi 프로젝트 생성하기  (0) 2021.07.08
vkey win32 / linux  (0) 2021.04.30
strptime  (0) 2021.02.17
Posted by 구차니