Commits

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.