git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Propose a change in open for passing in the file type.

From
Haritha D <harithamma.d@ibm.com>
Date
Dec 12, 2023, 14:46 UTC
Message-ID
<E1D54D98-3836-41CA-84B5-32AEAF7642D8@ibm.com>
Hi Everyone,
 
Am working on porting git to z/OS. For reference, the pull request am working on https://github.com/git/git/pull/1537.
 
On z/OS there is a notion of file tag attributes. Files can be tagged as binary, ASCII, UTF8, EBCDIC, etc. z/OS uses these attributes to determine if auto-conversion is necessary. It was recommended in PR that we add logic directly to xopen . In order for me to do this in xopen , I have to pass an extra parameter to xopen that specifies the file type. 
 
Ex: 
xopen(output_file, O_CREAT | O_WRONLY | O_TRUNC, 0666);
 
To :
xopen(output_file, O_CREAT | O_WRONLY | O_TRUNC, 0666, BINARY);
 
BINARY: would be an enum value.
 
Would this be okay to do? Or are there other recommendations?
 
Best regards
Haritha
Next: Torsten Bögershausen
Message 1 of 4 in “Propose a change in open for passing in the file type.”
  1. Haritha DDec 12, 2023
  2. Torsten BögershausenDec 12, 2023
  3. Đoàn Trần Công DanhDec 13, 2023
  4. Torsten BögershausenDec 16, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.