Nate Coraor avatar Nate Coraor committed 494c2d1

Fixes to allow BGZF to compile on Solaris

Comments (0)

Files changed (2)

src/samtools/bgzf.c

     return fp;
 }
 
+#ifdef __SUNPRO_C
+BGZF*
+bgzf_open(const char* path, const char* mode)
+#else
 BGZF*
 bgzf_open(const char* __restrict path, const char* __restrict mode)
+#endif
 {
     BGZF* fp = NULL;
     if (mode[0] == 'r' || mode[0] == 'R') { /* The reading mode is preferred. */
     return fp;
 }
 
+#ifdef __SUNPRO_C
+BGZF*
+bgzf_fdopen(int fd, const char * mode)
+#else
 BGZF*
 bgzf_fdopen(int fd, const char * __restrict mode)
+#endif
 {
 	if (fd == -1) return 0;
     if (mode[0] == 'r' || mode[0] == 'R') {

src/samtools/bgzf.h

  * A subsequent bgzf_close will not close the file descriptor.
  * Returns null on error.
  */
+#ifdef __SUNPRO_C
+BGZF* bgzf_fdopen(int fd, const char* mode);
+#else
 BGZF* bgzf_fdopen(int fd, const char* __restrict mode);
+#endif
 
 /*
  * Open the specified file for reading or writing.
  * Mode must be either "r" or "w".
  * Returns null on error.
  */
+#ifdef __SUNPRO_C
+BGZF* bgzf_open(const char* path, const char* mode);
+#else
 BGZF* bgzf_open(const char* path, const char* __restrict mode);
+#endif
 
 /*
  * Close the BGZ file and free all associated resources.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.